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

If all you want to do is play with %INC, instead of actually inspecting the symbol table properly, then you might as well use the standard core module, Module::Loaded.

Replies are listed 'Best First'.
Re^3: How to tell if a package is loaded
by mifflin (Curate) on May 03, 2011 at 00:14 UTC
    What version of Perl did Module::Loaded become core in? I'm using 5.8.8 and it is not available there.
    $ perl -MModule::Loaded Can't locate Module/Loaded.pm in @INC (@INC contains: /usr/lib64/perl5 +/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5 +.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_ +64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5 +/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/li +b/perl5/5.8.8 .). BEGIN failed--compilation aborted.
      $ corelist Module::Loaded Module::Loaded was first released with perl v5.9.4
      I'm on 5.12.2.

      See also New modules