Perl: the Markov chain saw | |
PerlMonks |
Re: Delegating to a role in Mooseby Dallaylaen (Chaplain) |
on Jan 12, 2018 at 10:46 UTC ( [id://1207147]=note: print w/replies, xml ) | Need Help?? |
Hello nysus, It looks like you can't have with "Foo"; in your class and handles "Foo"; in an attribute at the same time, which is quite natural - you either impersonate a role, or point to someone else performing it for you. You have to choose. I'm new to Moose, though. Take my advice with a grain of salt. Hope that helps. UPD: a minimal example
This doesn't work. One needs to comment out either "with", or "handles" in Foo.pm for the perl -I. doo.pl to output 42 correctly.
In Section
Seekers of Perl Wisdom
|
|