Subject: | Moose Attribute Traits are still globally registered strings. |
I was just reviewing the UI to add a costumed labeled attribute trait:
http://search.cpan.org/~drolsky/Moose-
1.10/lib/Moose/Cookbook/Meta/Recipe3.pod
It seems to me like this is eerily the same bad design decision that led
to global string-types rather than MooseX::Types. Why not instead use
the same system for exporting subs that describe the Attribute Trait
than string names?
package Moose::Meta::Attribute::Custom::Trait::Labeled;
sub register_implementation {'MyApp::Meta::Attribute::Trait::Labeled'}
That just looks ugly. Looking back at it...
- Mention MooseX::Types early to avoid users falling down the
string parsing rathole (mst)
--
Evan Carroll
System Lord of the Internets
http://www.evancarroll.com