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, |
In reply to Re: Namespace weirdness with Parallel::ForkManager using 0 children
by Athanasius
in thread SOLVED [ create_class_with_roles() ]: Moo[se] namespace weirdness with conditionally composed-in Roles
by 1nickt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |