in reply to require at compile time?

As reported in defined: "Use of defined on aggregates (hashes and arrays) is deprecated." so I wouldn't depend on your example producing a consistant result.

Replies are listed 'Best First'.
Re^2: require at compile time?
by ikegami (Patriarch) on Nov 07, 2008 at 03:00 UTC
    exists $::{'URI::'} returns the desired result in both versions.
      As does exist exists $INC{'URI.pm'}

        Not necessarily:

        perl -wle "print $URI::VERSION; print $INC{'URI.pm'}; print $::{'URI:: +'}"

        The namespace URI isn't necessarily populated by use URI;, it might come from a pasted snippet or from accessing global symbols in it.

      Nice! Thanks.