Pacific-Design.com

    
Home Index

1. Perl5

2. CPAN

+ Create Module

+ Installation

Perl5 / CPAN /

CPAN - Comprehensive Perl Archive Network

Find Module Location

#!/usr/bin/env perl 
use strict;
my $NAME = shift;                                                                                                                                                                            
my $mod  = $NAME;
my $imod = $mod . ".pm";
$imod =~ s|::|/|g;
eval "require $mod";
print $INC{$imod}, "\n";

Output

$ module JSON::XS
$ /usr/local/lib/perl/5.14.2/JSON/XS.pm
$ vim `module JSON::XS`

Configure CPAN:

cpan> install CPAN
cpan> reload CPAN

cpan> o conf init
cpan> o conf prerequisites_policy follow
cpan> o conf commit
cpan> upgrade