github twitter email rss
Perl
0001 Jun 1
One minute read

Perl

cpan

o conf init

cpan -i App::cpanminus
cpanm

http://perlbrew.pl/

use strict;
use warnings; 
use My::Module; 

@INC

Every directory listed in PERL5LIB variable will be added to the beginning of @INC.

export PERL5LIB=/home/foobar/code

Adding a use lib statement to the script will add the directory to @INC for that specific script.

use lib '/home/foobar/code';
use My::Module;

Add a -I /home/foobar/code flag to perl when running the script.

perl -I /home/foobar/code script.pl

Back to posts


comments powered by Disqus