Learn how to install Perl 5 locally to solve Exercism's exercises on your own machine
Perl 5 is likely already installed. Run
perl -v to check which version you have.
If your version is older than v5.14.0, or you would like to try out newer versions
of Perl 5, take a look at 'Other Options'.
If you are using Fedora/Red Hat/CentOS, some core modules are not included with Perl.
yum install perl-core command to install them.
Strawberry Perl: A 100% Open Source Perl for Windows that is exactly the same as Perl everywhere else; this includes using modules from CPAN, without the need for binary packages.
You can either install this directly from the site or use the chocolatey package manager.
$HOMEdirectory. They are completely isolated perl universes.
In addition to Perl 5, you will also need to install the
Test2::V0 testing bundle.
Use the following instructions to set this up (or feel free to use your favorite
module installer if you are already familiar with Perl):
Ensure that the exercism CLI has already been installed and configured.
exercism workspace should show you the appropriate path.
cpm module installer and use it to install itself,
Test2::V0 into your
# *nix curl -sL --compressed https://git.io/cpm | \ perl - install -L $(exercism workspace)/perl5 App::cpm local::lib Test2::V0 # Microsoft PowerShell (Invoke-WebRequest -UseBasicParsing 'https://git.io/cpm').Content | perl - install -L "$(exercism workspace)/perl5" App::cpm local::lib Test2::V0
local::libto set up your environment to use the modules you have installed into
# *nix eval $(perl -I$(exercism workspace)/perl5/lib/perl5 -Mlocal::lib=$(exercism workspace)/perl5) # Microsoft PowerShell perl -I"$(exercism workspace)/perl5/lib/perl5" -M"local::lib=--shelltype=powershell,$(exercism workspace)/perl5" | Invoke-Expression
The environment changes from the above command will not persist, and will
need to be rerun if you restart your shell. If you would like your environment
to be set up automatically each time, modify your
.bashrc (or *nix equivalent)
PowerShell_profile.ps1 to include the above command.
The documentation for local::lib can be found here.
Alternatively, the package manager for your OS may have a Test2 Suite package available for you to install. Available options include: