in reply to Re: why is a 2-argument bless not working in my situation
in thread why is a 2-argument bless not working in my situation
However, Perl is not psychic. So, when you see most constructors ending with: bless $self, $class; $self is not modified.This is wrong, $self is modified. Try e.g. this:
sub foo { my $self = {}; bless $self, 'Bar'; return $self; } print "isa Bar.\n" if foo()->isa('Bar');
-- Hofmator
|
|---|