Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools


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

mkdir ~/lib
cd ~/lib
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 test
make install

In the actual script you want to run, include this:
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