Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Can't blessby choroba (Cardinal) |
on Mar 21, 2021 at 15:51 UTC ( [id://11130037]=note: print w/replies, xml ) | Need Help?? |
The second parameter to bless is a string, not a bareword. Most often, you don't specify the class name directly, but use the first parameter of the constructor:
That's because when you inherit from the class, the constructor will work for the new class, as well, without a need to write a new one specifying the subclass.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom
|
|