|Subject:||hook for package to describe attributes|
|Date:||Thu, 02 Dec 2010 09:06:40 +1100|
|To:||bug-Class-MOP [...] rt.cpan.org|
|From:||Kevin Ryde <user42 [...] zip.com.au>|
I saw in the Class::MOP::Class that attributes in a target class can't be found automatically. Is there a hook or something that a target class can define to describe itself? I thought maybe of a package variable, or maybe a whole file like Class::MOP::Class::AutoInfo::Foo::Bar which Foo::Bar might supply if its info was big or ugly or rarely wanted. It wouldn't make Foo::Bar depend on Class::MOP as such, just be a bit of optional inter-operation. I merely wanted to find out if certain parameters existed to a new() -- on some of my own plain perl5 classes (no moose or anything) -- and before doing something specific I wondered if there was an info format recognised by external introspecting packages. (Class::MOP is almost the only plain perl5 introspector is it?, outside the full oop-ery frameworks ...).