DEV Community

Tib
Tib

Posted on

Inspecting loaded Perl modules

#!/usr/bin/env perl

use Acme::Prereq::F; 

while (($k, $v) = each (%INC)) { 
    print "$k => $v\n";
}
Enter fullscreen mode Exit fullscreen mode

That produces:

strict.pm => /usr/share/perl/5.26/strict.pm
warnings.pm => /usr/share/perl/5.26/warnings.pm
Acme/Prereq/F.pm => /usr/local/share/perl/5.26.1/Acme/Prereq/F.pm
Enter fullscreen mode Exit fullscreen mode

🎉

Top comments (0)