in reply to Re^2: package compiling
in thread package compiling

One "cool" thing you can do with %INC is to print out a comprehensive list of modules (including dependencies) and where they have been loaded from, by putting the following in your script:

END { say for sort values %INC; }

(useful for debugging, or just to explore how things work)

Replies are listed 'Best First'.
Re^4: package compiling
by simonodell (Acolyte) on Apr 13, 2011 at 20:34 UTC
    I just tried...
    #!/usr/bin/perl END { say for sort values %INC; }
    And got nothing?
      That's because you didn't use any modules!

      Try this instead

      #!/usr/bin/perl use 5.010; use List::Util; END { say for sort values %INC; }