in reply to Re^3: Moose: What about "class" attributes?
in thread Moose: What about "class" attributes?
Ah, so instead of
you would writewith 'MooseX::Traits'; has '+_trait_namespace' => ( default => 'Another' );
That could store the string in lexical variable that the instantiated role's code blocks are closed over, so it knows the value you told it. ((I'm borrowing the terminology from C++ templates: instantiate means to spit out a real type from a template))with 'MooseX::Traits' => { 'trait_namespace' => 'Another' };
That certainly is more to think about.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Moose: What about "class" attributes?
by stvn (Monsignor) on May 02, 2011 at 00:56 UTC | |
by John M. Dlugosz (Monsignor) on May 02, 2011 at 03:59 UTC | |
by stvn (Monsignor) on May 03, 2011 at 01:41 UTC | |
by John M. Dlugosz (Monsignor) on May 03, 2011 at 05:16 UTC | |
by stvn (Monsignor) on May 03, 2011 at 18:54 UTC |
In Section
Seekers of Perl Wisdom