[Columbus-pm] use lib and BEGIN @INC

Jonathan Hogue jon at hogue.org
Fri Nov 12 14:05:23 PST 2010


never mind... they both were working the same, except, my code using
the second case had a trailing space in the path name.

(use lib also does some extra path searches based on the architecture,
it appears, but that wasn't my problem.)

On Fri, Nov 12, 2010 at 4:45 PM, Jonathan Hogue <jon at hogue.org> wrote:
> What's the difference between
> use lib "/somepath";
> and
> BEGIN{ unshift( @INC, "/somepath" ) };
>
> When I do
> use DQ::SomeModule after the "use lib" approach, it works, but not
> after the BEGIN block, even though when I dump @INC, it shows the
> /somepath for both scenarios.
>


More information about the Columbus-pm mailing list