in reply to Can I see "requires"?

If you take a copy of %INC at some point early in the program, and then later compare it to the then current value of %INC, it will tell you what has been added in the interim. It won't just contain what your code directly required, but also anything that they in turn used or required:

C:\test>p1 %i = %INC;; require HTTP::Daemon;; exists $INC{$_} and not exists $i{$_} and print "$_ added" for keys %I +NC;; IO/Handle.pm added HTTP/Status.pm added SelectSaver.pm added Time/Local.pm added IO/Socket.pm added Fcntl.pm added Symbol.pm added HTTP/Date.pm added URI.pm added IO/Socket/INET.pm added C:/Perl64/lib/auto/Storable/autosplit.ix added Errno.pm added File/Spec.pm added HTTP/Response.pm added File/Spec/Win32.pm added LWP/MediaTypes.pm added IO/Seekable.pm added integer.pm added IO/Socket/UNIX.pm added IO.pm added HTTP/Daemon.pm added HTTP/Message.pm added File/Spec/Unix.pm added FileHandle.pm added HTTP/Request.pm added Socket.pm added IO/File.pm added URI/Escape.pm added HTTP/Headers.pm added Storable.pm added

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?

Replies are listed 'Best First'.
Re^2: Can I see "requires"?
by jwkrahn (Abbot) on Mar 08, 2012 at 12:04 UTC
    exists $INC{$_} and not exists $i{$_} and print "$_ added" for keys %I +NC;;

    You know that $INC{$_} exists because you just accessed it from keys %INC!!    Did you think that it got deleted somehow?

    exists $i{ $_ } or print "$_ added" for keys %INC;

      Good point!

      A literal translation of the thought: If it's now in %INC and not in %i, it was added.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

      The start of some sanity?