in reply to Problem generating builder functions with Moose for inherited objects
I just had another look at the documentation and it turns out there is a meta method that you can use to do what you want:
(from the MOP documentation). Prints out all attributes including inherited ones. To use it, I guess you should only define a BUILD method in the Parent class, where you replace your loop through the attributes by the above.for my $attr ( $meta->get_all_attributes ) { print $attr->name, "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem generating builder functions with Moose for inherited objects
by Neighbour (Friar) on Sep 06, 2010 at 13:51 UTC | |
by tospo (Hermit) on Sep 07, 2010 at 09:02 UTC |