http://www.perlmonks.org?node_id=1010546


in reply to Re: Class Attributes with Moo ?
in thread Class Attributes with Moo ?

Thank you for your reply :-) I was wondering if i was missing anything.
In the future if i need to use inheritance, i might put this timer as a simple attribute, and pass it to my objects from the client code. It's giving some non-related job to the client, but it should do the trick.
I'll keep an eye open, in case you created a new MooX module. Sorry i cannot help : i don't have the skills nor the time to develop them right now.

Replies are listed 'Best First'.
Re^3: Class Attributes with Moo ?
by tobyink (Canon) on Jan 01, 2013 at 10:37 UTC

    OK, MooX::ClassAttribute is now on CPAN. Subclassing Method::Generate::Accessor to generate class attributes was relatively easy. The hard parts were getting class attributes defined in roles to work, and getting Moose inflation going.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

      Wow, that was fast! You're a star thanks a lot :-)