in reply to SOLVED [ create_class_with_roles() ]: Moo[se] namespace weirdness with conditionally composed-in Roles
Hello 1nickt,
This behaviour does not appear to be due to Parallel::ForkManager. I can reproduce it with just the following test script:
#! perl use strict; use warnings; use MyClass; for my $foo (1 .. 2) { my $o = MyClass->new({ number => $foo }); $o->bar($foo); }
Output:
16:56 >perl 1576a_SoPW.pl 6052 1 MyClass=HASH(0x4b4ca8) loading Odd at MyClass.pm line 8. 6052 Loaded Odd at Odd.pm line 4. 6052 1 MyClass=HASH(0x4b4ca8) I am Odd at Odd.pm line 7. 6052 2 MyClass=HASH(0x2274048) loading Even at MyClass.pm line 8. 6052 Loaded Even at Even.pm line 4. 6052 2 MyClass=HASH(0x2274048) I am Odd at Odd.pm line 7. 16:56 >
Changing from Moo to Moose makes no difference to the result.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Namespace weirdness with Parallel::ForkManager using 0 children
by 1nickt (Canon) on Mar 21, 2016 at 07:21 UTC | |
by Athanasius (Archbishop) on Mar 21, 2016 at 07:32 UTC | |
by 1nickt (Canon) on Mar 21, 2016 at 08:14 UTC |