in reply to Re: Can't use two Moose classes with the same coercion action
in thread Can't use two Moose classes with the same coercion action

Maybe I missed some implication since I don't know Moose, but how can you combine two classes into one package?

Incidentally, the OP's code doesn't compile for me.

$ perl -e'use Foo; use Bar;' String found where operator expected at Foo.pm line 3, near "coerce 'A +rrayRef'" (Do you need to predeclare coerce?) String found where operator expected at Foo.pm line 3, near "from 'Int +'" (Do you need to predeclare from?) syntax error at Foo.pm line 3, near "coerce 'ArrayRef'" Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1.

Replies are listed 'Best First'.
Re^3: Can't use two Moose classes with the same coercion action
by Anonymous Monk on Apr 24, 2009 at 15:17 UTC
    1. Open package
    2. put the classes in the package
    3. shake the package
    :D