Following up on my previous question,

I'm reading about metaclass traits in the Cookbook:

  http://search.cpan.org/~flora/Moose-1.03/lib/Moose/Cookbook/Meta/Recipe5.pod

My understanding was that traits were little thingies you hang off
attributes. For example, I am using the native type attribute traits
with great success. But the thing in this recipe appears to be nothing
more than a role for a metaclass. Are traits and roles the same, here?

Also, let's suppose I want people to say

   use MyApp -traits 'HasHandlers';

Do I need to provide a register_implementation method in the Moose
namespace? What exactly does that do?

Finally, is there a way I can apply the trait dynamically? (again, to
save typing since every user of my Exporter module will want this
trait.)

Thanks for all the help so far,


Mike

Reply via email to