Perl Monk, Perl Meditation | |
PerlMonks |
Can't use two Moose classes with the same coercion actionby KSURi (Monk) |
on Apr 24, 2009 at 14:33 UTC ( [id://759849]=perlquestion: print w/replies, xml ) | Need Help?? |
KSURi has asked for the wisdom of the Perl Monks concerning the following question:
Hello, monks! I have 2 Moose-based classes: Foo.pm:
and Bar.pm: When I try to use both classes in one script I get this: The problem is that I have scripts which uses both Foo and Bar, and scripts which uses only one of them. So I have to define coercion in both classes. How can I lexically scope coercion action for each class?
Back to
Seekers of Perl Wisdom
|
|