http://qs1969.pair.com?node_id=845170


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::Concisefor Grandparent::Parent::Child; also, make sure that you "use" the package just below use warnings.