http://www.perlmonks.org?node_id=11121217


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

Devel::SymDump has a decent interface for most of what you need.

Lexical variables are harder, as noted by BillKSmith in 11121213. You can get some details using PadWalker. However, that requires your code to be called by the sub, which means you are usually the person writing it, and should therefore know what the variables are.

That said, lexical variables are not provided by a module so are probably out of scope for the question anyway.