Re: Adding traits at runtime

[email protected] (Stevan Little)
Newsgroups perl.moose
Message-ID <[email protected]>
Dan,

Something like this maybe?

My::Trait->meta->apply(My::Class->meta->get_attribute('foo'));

- Stevan

On Jun 9, 2008, at 4:21 PM, Dan Harbin wrote:

> Is there a way to add a trait to an attribute at runtime?  I know  
> it can be
> done through the "new" method of Moose::Meta::Attribute, but what  
> about
> adding one after it's been initialized?
>
> Thanks,
> Dan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.