If you want to know if a package is defined, rather than whether a correspondingly-named file has been loaded, the OP's approach is correct.$ echo 'package A; package B; 1' > A.pm; perl -MA -le 'print for keys +%INC' A.pm
In reply to Re^2: How to tell if a package is loaded
by educated_foo
in thread How to tell if a package is loaded
by mifflin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |