discover all packages subclassing some other package

discover all packages subclassing some other package

am 11.06.2011 08:25:15 von oleber

--e0cb4e700467341ac704a569c2bd
Content-Type: text/plain; charset=ISO-8859-1

I need to discover all the packages (not files, the symbolic tables) that
are child of my package, something like:

my @child = map { $_->isa('My::Class') } ->ALL_PACKAGES<-

How do I create the ->ALL_PACKAGES<- list?


Notice that the focus of these question is the creation of ->ALL_PACKAGES<-


Thanks for all your help

Marcos Rebelo

--
Marcos Rebelo
http://www.oleber.com/
Webmaster of http://perl5notebook.oleber.com

--e0cb4e700467341ac704a569c2bd--

Re: discover all packages subclassing some other package

am 11.06.2011 09:23:27 von oleber

I found an half solution, since it doesn't get me the ->ALL_PACKAGES<-

mro::get_isarev($classname)

How do I get the ->ALL_PACKAGES<-?


Thanks for all your help
Marcos Rebelo

On Sat, Jun 11, 2011 at 08:25, marcos rebelo wrote:
>
> I need to discover all the packages (not files, the=A0symbolic=A0tables) =
that are child of my package, something like:
> my @child =3D map { $_->isa('My::Class') } ->ALL_PACKAGES<-
>
> How do I create the=A0->ALL_PACKAGES<- list?
>
> Notice that the focus of these question is the creation of=A0->ALL_PACKAG=
ES<-
>
> Thanks for all your help
> Marcos Rebelo
> --
> Marcos Rebelo
> http://www.oleber.com/
> Webmaster of http://perl5notebook.oleber.com



--
Marcos Rebelo
http://www.oleber.com/
Webmaster of http://perl5notebook.oleber.com

--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

Re: discover all packages subclassing some other package

am 11.06.2011 17:09:07 von Peter Scott

On Sat, 11 Jun 2011 08:25:15 +0200, marcos rebelo wrote:

> I need to discover all the packages (not files, the symbolic tables)
> that are child of my package, something like:
>=20
> my @child =3D map { $_->isa('My::Class') } ->ALL_PACKAGES<-
>=20
> How do I create the ->ALL_PACKAGES<- list?

Class::Inspector->subclasses.

--=20
Peter Scott
http://www.perlmedic.com/ http://www.perldebugged.com/
http://www.informit.com/store/product.aspx?isbn=3D0137001274
http://www.oreillyschool.com/courses/perl3/

--=20
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/