good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: method aliases with goto(&NAME)by tobyink (Canon) |
on Sep 17, 2013 at 11:32 UTC ( [id://1054424]=note: print w/replies, xml ) | Need Help?? |
Won't somebody please think of the children?!?!.
If you swap in your goto implementation of the legacy method, then calling Child->legacy_method returns 1. Here's an alternative safer version using goto...
See also http://tvtropes.org/pmwiki/pmwiki.php/Main/ThinkOfTheChildren.
use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
In Section
Seekers of Perl Wisdom
|
|