in reply to Re^2: Moose: return null object
in thread Moose: return null object
my $x = Object::new();
instead of the canonical
my $x = 'Object'->new;
means it doesn't bless to its first parameter as usually
sub new { bless {}, shift }
which in turn means it doesn't work in child classes, because it always creates the object of the parent class.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Moose: return null object
by Anonymous Monk on Jul 02, 2015 at 14:46 UTC | |
|
Re^4: Moose: return null object
by Anonymous Monk on Oct 16, 2015 at 09:59 UTC |