------------------------------------------------------------------------------- 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) Replace the first line above with... perl Makefile.PL LIB=~/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 your t/csh environment, by adding to your ".login" file... setenv 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'` setenv 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 env LIB=$PERL5LIB perl -MCPAN -e 'install WWW::Curl' 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 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 -------------------------------------------------------------------------------