in reply to Moose class not being constructed

When I move the ThreeD::Model package definition to the top of the script, I'm getting a different error:
Attribute (active_entities) does not pass the type constraint because: + Validation failed for 'Entities' with value ThreeD::Entities=HASH(0x +6011b0a80) at constructor ThreeD::Model::new ...

So, I changed the constraint to

has 'active_entities' => (isa => 'ThreeD::Entities',

and...

No more errors! (The output is still different, as it says DEBUG 2b, not 2a.)

Update: Why does it work? has is a Perl subroutine, it doesn't run at compile time. You need to actually run the code at runtime for it to have effect.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: Moose class not being constructed
by SwaJime (Scribe) on Nov 16, 2015 at 14:10 UTC

    Awesome! That works :-) :-)

    Thank you very much choroba!