Thanks for your reply. I had to set this project aside for a little while, but I was able to return to it tonight and whittle down the actual problem.
After some playing around, the reason turned out to be the specific object being tested having a BUILDALL. Commenting out the BUILDALL method allowed the object to be constructed in the right class.
To narrow it down from there, the BUILDALL started by calling callsame, as discussed in https://doc.perl6.org/language/objects. Changing that to nextsame (as shown in https://doc.perl6.org/language/traps) allowed the object to be constructed as expected.
"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.
In reply to Re^2: Factory Pattern in Perl6
by hardburn
in thread Factory Pattern in Perl6
by hardburn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |