Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: get the list of methods and variables

by Khen1950fx (Canon)
on Jun 17, 2010 at 09:17 UTC ( #845170=note: print w/ replies, xml ) Need Help??


in reply to get the list of methods and variables

To get a list of methods and variables from child.pm, I would use Devel::Symdump. Here's an example:

#!/usr/bin/perl use strict; use warnings; use Data::Dumper::Concise; require Devel::Symdump; my @packs = qw(Data::Dumper::Concise); my $obj = Devel::Symdump->new(@packs); my @array = $obj->scalars; @array = $obj->arrays; @array = $obj->hashes; my $string = $obj->as_string; print $string, "\n";
I substituted Data::Dumper::Concise for Grandparent::Parent::Child; also, make sure that you "use" the package just below use warnings.


Comment on Re: get the list of methods and variables
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (11)
As of 2014-12-22 19:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (128 votes), past polls