in reply to Re: package compiling
in thread package compiling

That's exactly what I needed to know thanks! Now I'm wondering if there is anything cool I can with this %INC variable... hrm I'll have to have a think about that.

Replies are listed 'Best First'.
Re^3: package compiling
by Eliya (Vicar) on Apr 13, 2011 at 17:30 UTC

    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)

      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; }