Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools


local_perl_modules

To install a local perl module, follow steps like these:

mkdir ~/lib
cd ~/lib
wget http://search.cpan.org/CPAN/authors/id/R/RK/RKHILL/DateTime-Astro-Sunrise-0.01_01.tar.gz
tar -zxvf DateTime-Astro-Sunrise-0.01_01.tar.gz
cd DateTime-Astro-Sunrise-0.01_01
perl Makefile.PL PREFIX=~/lib LIB=~/lib
make
make test
make install
<code>

In the actual script you want to run, include this:
<code>
use lib '/path/to/username/lib';
use DateTime;
use DateTime::Astro::Sunrise;

Simple test script that checks the perl modules used on local system:

#!/usr/bin/perl -w

use Array::Diff;
use Array::Unique;
use File::Compare;
use File::Copy;
use File::Path;
use File::Slurp;
use Getopt::Long;
use HTML::TableExtract;
use IO::All;
use IPC::System::Simple qw(capture capturex system systemx run runx $EXITVAL EXIT_ANY);
use LWP::Simple;
use Math::Round;
use Sys::Hostname;
use Term::ANSIColor;
use Text::Unidecode;
local_perl_modules.txt · Last modified: 2020/09/29 19:59 by juckins