------------------------------------------------------------------------------- Test if a Module is installed and can be found... perl -Mmodule -e 'print "Ok\n"' or its version perl -Mmodule -le 'print $module::VERSION' Standard Module Installation perl Makefile.PL make make test make install Private Module Installation (in your home directory) # See http://faqomatic.sourceforge.net/fom-serve/cache/437.html Make directory mkdir ~/lib/perl5 ln -s ../.. ~/lib/perl5/lib ln -s .. ~/lib/perl5/site_perl ln -s .. ~/lib/perl5/5.10.0 Install perl local::lib module See documentation in http://search.cpan.org/~apeiron/local-lib-1.008001/lib/local/lib.pm preferably as a sysyem module yum install perl-local-lib or install into local lib area, using special bootstrap code perl Makefile.PL --bootstrap=$HOME/lib/perl5 --no-manpages Setup environment variables... NOTE this prepends "$HOME/lib/perl5/bin" to path eval $( perl -Mlocal::lib=$HOME/lib/perl5 ) OR bootstrapped from local area, using eval $( perl -I$HOME/lib/perl5 -Mlocal::lib=$HOME/lib/perl5 ) Other CPAN modules can then be installed using... perl -MCPAN -Mlocal::lib -e 'CPAN::install( MODULE )' # Replace the first line above with... # # perl Makefile.PL PREFIX=~/lib/perl5 # # The Makefile will then install into ~/lib/perl5 # and architecture-dependent files into ~/lib/perl5/$archname/auto # # To use this personal perl library set a PERL5LIB environment variable... # # export PERL5LIB="$HOME/lib/perl5" # # And if you install architecture-dependent modules (compiled parts) # append to the above the following extension... # # eval set `perl '-V:archname'` # export PERL5LIB="$PERL5LIB:$PERL5LIB/$archname" # unset archname ------------------------------------------------------------------------------- interactive perl -MCPAN -e shell r recomendations on what packages to re-install b list all the major software bundles readme pkg print the readme for the package instal pkg install the package Force upgrade of a module perl -MCPAN -e 'force install MIME::Base64' Personal install See local::lib above OR http://search.cpan.org/~apeiron/local-lib-1.008001/lib/local/lib.pm # WARNING: this is now failing - install is to /usr/local/lib! # (Need to some how set PREFIX - and remove perl version part) # # env PERL5LIB=$HOME/lib/perl5 perl -MCPAN -e 'install Math::Polynomial' # # What upgrade recomendations does CPAN make (non-interactive) # env PERL5LIB= perl -MCPAN -e 'CPAN::Shell->r' # # upgrade all currently instaled perl packages # env PERL5LIB= perl -MCPAN -e 'CPAN::Shell->install(CPAN::Shell->r)' # # Basic clean up, keeping metadata for future downloads... # rm -r ~/.cpan/build/* ~/.cpan/source/authors/id/* # chown -R anthony.anthony ~/.cpan ------------------------------------------------------------------------------- RPM Module/Install Creation from CPAN Add extra CPAN perl modules as RPM's First install the CPAN to RPM converter yum install cpan2rpm Or get noarch RPM from http://perl.arix.com/cpan2rpm/ Install modules as RPM packages cpan2rpm --force -U WWW::Curl ------------------------------------------------------------------------------- Module Creation for CPAN (General) * First create a raw module source directory with h2xs -X -n Foo::Bar * Move or rename the directory created appropriately for later tarring * Move / Create your module into the source directory * ... Module work ... * Edit the test.pl and/or other testing scripts as appropriate. OPTIONAL: create a "t" sub-directory and move test.pl to t/test.t or create other "t/*.t" test files using the same style. Numbering the test modules in sequence is a good idea * Do final tests make test install * Prepare the area for taring, creating a new MANIFEST with rm -f MANIFEST MANIFEST.bak perl Makefile.PL make distclean manifest distclean * Check MANIFEST and tar the directory for upload to CPAN -------------------------------------------------------------------------------