in reply to What vars did it define?
You might want to use this:
#!/usr/bin/perl -w use strict; for my $pkg (@ARGV) { eval "use $pkg;"; no strict 'refs'; my @candidates = keys %{$pkg . "::"}; for my $c (@candidates) { if (defined(${$pkg . "::" . $c})) { print "$pkg" . "::" . "$c = " . ${$pkg . "::" . $c}, "\n"; } } }
Run on some input:
> perl try.pl File::Find File::Find::dont_use_nlink = 1 >perl try.pl XML::Parser XML::Parser::VERSION = 2.27 XML::Parser::have_LWP = 1
Christian Lemburg
Brainbench MVP for Perl
http://www.brainbench.com
|
|---|