in reply to Can I find out which package a subroutine is from, originally?

I'll confess that I can't test this on my box, but you might be able to use Devel::Symdump. The documentation seems to indicate that doing:
use Devel::Symdump; my $dump = Devel::Symdump->new('Everything::node::user'); my @functions = $dump->functions();
Unfortunately, I'm just going by docs here, and don't know if this will work, or if it just encapsulates what you're already doing. Good luck.

Update: Tested. Doesn't work... prints out all, just like your above code. Sorry.

stephen

  • Comment on Re: Can I find out which package a subroutine is from, originally?
  • Download Code

Replies are listed 'Best First'.
Re: Re: Can I find out which package a subroutine is from, originally?
by nate (Monk) on Jan 03, 2001 at 06:29 UTC
    this actually gives me the same data that my code snippet posted above gives me. It looks like it's accessing the symbol table in a similar fashon.

    thanks anyway,

    --nate