Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following commands in a terminal shell will download and install plenv into your home directory, restart
the shell as a login shell, and install cpanm in the plenv environmentinstall perl 5.16.3, cpanm,
and all the CPAN modules required for SpamAssassin building and testing. After running this, cd to the working directory
and rebuild SpamAssassin starting with the perl Makefile.PL command.

With this old version of perl , the the sawampersand test can run. Read documentation about plenv to learn how to switch
between versions of perl.

git clone https://github.com/tokuhirom/plenv.git ~/.plenv
git clone https://github.com/tokuhirom/plenvPerl-Build.git ~/.plenv/plugins/perl-build/
echo 'export PATH="$HOME/.plenv/bin:$PATH"' >> ~/.profile
echo 'eval "$(plenv init -)"' >> ~/.profile
exec $SHELL -l
plenv install-cpanm

Don't expect plenv to be available in any other terminal windows until you have logged out and logged in
again or rebooted the machine.

...

export PATH="$HOME/.plenv/bin:$PATH"
eval "$(plenv init -)"
plenv install 5.16.3

...


...

plenv install 5.16.3 

To then switch to using that version of perl

rehash
plenv global 5.16.

To switch back to using the system perl

plenv global system 

To see a list of all versions of perl installed and ready to switch to, with the current one indicated

plenv versions 

To see just the current version

plenv version 

To run perl and have it show you the its version, so you can verify that plenv is working right

perl -v 

To disable plenv completely, all you have to do is edit ~/.profile  and comment out the two lines at the
end that you added with those echo  commands above, then restart your computer to be sure.
To enable it again, uncomment those two lines in ~/.profile  and restart.

The perl modules that were installed using apt will all have to be installed from CPAN into each perl version
that you install in plenv. Use the cpanm command, without -S option.

...

3
perl -v
plenv install-cpanm

cpanm HTML::Parser Net::DNS NetAddr::IP Digest::SHA1 Digest::SHA DB_File Mail::SPF \
GeoIP2 GeoIP2::Database::Reader Geo::IP IP::Country::DB_File Net::CIDR::Lite \
IO::Socket::INET6 IO::Socket::SSL Mail::DKIM DBI LWP::UserAgent HTTP::Date \
Encode::Detect::Detector Net::Patricia Net::DNS::Nameserver \
BSD::Resource Archive::Zip IO::Compress IO::String BerkeleyDB BSD::Resource DBI Encode::Detect \
Mail::DKIM Sys::Hostname::Long Test::Pod::Coverage Test::Pod \
Devel::SawAmpersand Mail::DMARC::PurePerl Devel::Cycle Email::Address::XS \
Geography::Countries IP::Country Math::Int128 Net::Works::Network Net::LibIDN2 \
Net::LibIDN MaxMind::DB::Reader::XS Test::Perl::Critic

...



cpanm Mail::SPF -n --install-args="--install_path sbin=$HOME/bin" 

...