Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Can't locate in @INC

by sundialsvc4 (Abbot)
on Feb 14, 2014 at 01:56 UTC ( #1074924=note: print w/replies, xml ) Need Help??

in reply to Can't locate in @INC

First, do this:

perl -V
with a capital -V ...

This will give you, among a great many other things, a complete list of all the places that Perl will look for anything, and the sequence in which it will look for them.   (Within a running Perl program, this is accessible as the array-variable, @INC ...)

If Perl cannot find a module, yet cpan can, it simply means that the two are not looking in the same places.   (And, by the way, this is by design ...)

Generally speaking, this information is provided by an “environment variable” named PERL5LIB.   On a Unix-like system, this will most-likely be set by a local script (e.g. .bash_profile.   On a Windows system, this will be set in the registry and/or in the System control-panel, or by a profile.

In any case, perl -V with a capital-V will tell you “what Perl actually knows,” drawing from all of its various sources of information.   “When the rubber finally hits the road,” the list that Perl will obligingly give to you is its authority.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1074924]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2018-06-20 18:10 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (117 votes). Check out past polls.