in reply to Re: How to tell if a package is loaded
in thread How to tell if a package is loaded

Kind of. Remember that a file can define more than one package, e.g.
$ echo 'package A; package B; 1' > A.pm; perl -MA -le 'print for keys +%INC' A.pm
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.