in reply to Moose: Exporting non-moose subs to child

Just
use Test::Most;

in Child.

Just because Moose provides another object model doesn't mean you have to throw away all your other Perl knowledge when you use it :-).

(The the usual approach is to put the tests into a separate file, not into the class directly).

Replies are listed 'Best First'.
Re^2: Moose: Exporting non-moose subs to child
by elTriberium (Friar) on Jul 21, 2011 at 16:04 UTC
    I was actually trying to put the use statement into the parent class to get rid of this ugly line in the child:
    use Test::Most '!blessed';

    The !blessed part is required because Moose and Test::Most don't play together well. So now I want to put this in the parent as there will be hundreds of children of this parent and I don't want to repeat this line over and over again.

    If, however, this doesn't work, then I'll just have to live with it.

        Those will actually be the test cases. And we have thousands of test cases.