Does Perl look in .
(the current directory) for modules?
I can't directly install a module and I think I could copy it into the local directory. Is this true?
perl -V
will print out various properties about your Perl installation, including the default @INC
. You should notice a .
in there: yes, the current working directory is searched for modules by default.
UPDATE: As of Perl 5.26, .
is no longer included in @INC
.
(If not, you can use environment variables PERL5LIB
or PERLLIB
, or -I
on the command line, or add a sitecustomize.pl
to perl -V:sitelib
.)