Re: Moose hook
[email protected] (Peter Gordon)
| Newsgroups | perl.moose |
|---|---|
| Message-ID | <1318950128.2884.21.camel@qed> |
This is the example I am working with:
package MyRole ;
with Moose::Role ;
# Operate on the 'has' items
sub runMe {
}
package X ;
use Moose ;
has 'item' => ( is => 'rw' , isa => 'Str') ;
package Y ;
use Moose ;
extends 'X' ;
with 'MyRole';
I would like to be able to define package MyRole such that when it is
invoked, runMe() gets run automatically without having to run
it explicitly in package Y.