Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Finding classes which are inherited from a given class

by gellyfish (Monsignor)
on Aug 06, 2004 at 09:16 UTC ( [id://380480]=note: print w/replies, xml ) Need Help??


in reply to Finding classes which are inherited from a given class

It's a dirty rotten hack but someone had to do it:

package Foo; + sub bar {}; + 1; + package Bar; + use base qw(Foo); + 1; + package main; + for my $foo (grep /::/ , keys %:: ) { if ( exists %{$foo}->{ISA} ) { print @{%{$foo}->{ISA}},"\n"; } }
There are probably modules that do this smarter however.

/J\

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://380480]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-25 09:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found