in reply to Re: How do I check all the variables, subroutines etc in a Perl Module?
in thread How do I check all the variables, subroutines etc in a Perl Module?

> (and may not even exist)

For clarification:

As soon as a sub is compiled, it's lexical vars will "exist". They'll just be undefined outside their scope.

DB<23> sub foo { my $bar =42 } DB<24> use PadWalker qw/peek_sub/; DB<25> x peek_sub(\&foo) 0 HASH(0x31ffa38) '$bar' => SCALAR(0x31ff828) -> undef DB<26>

Peeking into file-scoped lexicals might be harder tho.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery