DWIM Perl for Linux - perl 5.20.1 - v10


This is a distribution of perl 5.20.1 with a some additional CPAN-modules.


  • perl 5.20.1
  • For included modules see the entries in this cpanfile


Besides CPAN modules there are also a few Applications included in DWIM Perl for Linux. Some of these are distributed as CPAN modules and so they are included as CPAN modules, other are (or will be) pulled in from their non-CPAN source distribution.

  • Rex aka. (R)?ex, Remote Execution for DevOps
  • Galileo - a simple modern CMS built on Mojolicious.
Web servers or applications servers


Shortly after the announcement a number of updates were released including some third-party C-libraries and many more CPAN modules. Below you can find the links to the tar.gz files and the respective GitHub tags. The instructions below were also adjusted to the most recent release.

Installation Instructions

$ cd
$ wget http://dwimperl.com/download/dwimperl-linux-5.20.1-10-x86_64.tar.gz
$ tar xzf dwimperl-linux-5.20.1-10-x86_64.tar.gz
$ source $(pwd)/dwimperl-linux-5.20.1-10-x86_64/dwim.sh
$ perl dwimperl-linux-5.20.1-10-x86_64/perl/bin/reloc_perl
In order to make the change persistent , add the resul of the following command to ~/.bashrc:
$ echo source $(pwd)/dwimperl-linux-5.20.1-10-x86_64/dwim.sh
That's it. Now you can run perl -v and see the new version of perl. To install additional CPAN modules type
$ cpanm Module::Name
DWIM Perl for Linux

released between 2014.09.25 and 2014.10.02.

The detailed story

DWIM Perl for Linux is being developed in the dwimperl-linux GitHub repository. The current version has been tagged dwimperl-linux-5.20.1-10. Installation starts with the following:

$ wget http://dwimperl.com/download/dwimperl-linux-5.20.1-10-x86_64.tar.gz
$ tar xzf dwimperl-linux-5.20.1-10-x86_64.tar.gz
Then we can try if it works by typing:
$ ./dwimperl-linux-5.20.1-10-x86_64/perl/bin/perl -v
This is the expected output:
This is perl 5, version 20, subversion 1 (v5.20.1) built for x86_64-linux

Copyright 1987-2014, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
We can also try the longer version:
$ ./dwimperl-linux-5.20.1-10-x86_64/perl/bin/perl -V
That will give the following output:
Summary of my perl5 (revision 5 version 20 subversion 1) configuration:
    osname=linux, osvers=2.6.18-308.1.1.el5, archname=x86_64-linux
    uname='linux dwimperl 2.6.18-308.1.1.el5 #1 smp wed mar 7 04:16:51 est 2012 x86_64 x86_64 x86_64 gnulinux '
    config_args='-des -Duserelocatableinc -Dprefix=/home/dwimperl/dwimperl-linux-5.20.1-1-x86_64/perl'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.1.2 20080704 (Red Hat 4.1.2-54)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib /lib /lib64 /usr/lib64 /usr/local/lib64
    libs=-lnsl -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.5.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'

Characteristics of this binary (from libperl): 
                        USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES
  Built under linux
  Compiled at Sep 24 2014 07:38:36
Please note, in this example the @INC lists directories in /home/other because for this example I created a user account called other. This also shows that this installation of Perl is relocatable. You can put it in any directory and it will use the correct path in @INC. Running plain perl will still reach the one that came with the operating system. In order to make it more comfortable we can set the PATH environment variable to include the diretory of DWIM-Perl. In addition, as being 'relocatable' still leaves a few parts of perl mapped to the original locattion we also included a module called DWIM.pm that we need to load for every module in order to make those changes. DWIM Perl for Linux solves this by putting -MDWIM in the PERL5OP environment variable. In addition we had to set the LD_LIBRARY_PATH variable as well. All this has been done in the dwim.sh shell script that comes with the distribution. That's what we need to load at this point:
$ source /home/other/dwimperl-linux-5.20.1-10-x86_64/dwim.sh
This will work in the current shell. If you'd like to make this change persisten in future shells as well, add this to your ~/.bashrc. Now we can try:
$ which perl
After this we can run
$ perl -v
$ perl -V
and see the results as before.


What about perldoc?
$ perldoc HTML::Template
-su: /home/other/dwimperl-linux-5.20.1-10-x86_64/perl/bin/perldoc: /home/dwimperl/dwimperl-linux-5.20.1-1-x86_64/perl/bin/perl: bad interpreter: No such file or directory
That does not work yet, because all the perl script in the /home/other/dwimperl-linux-5.20.1-10-x86_64/perl/bin/ directory have a sh-bang line pointing to the directory where this perl was originally built: /home/dwimperl/dwimperl-linux-5.20.1-1-x86_64/perl/bin/perl as user dwimperl. Running perldoc with the already configured perl will work, but it inconvenient:
$ perl dwimperl-linux-5.20.1-10-x86_64/perl/bin/perldoc HTML::Template
DWIM Perl for Linux includes a script called reloc_perl that will update the sh-bang lines of the scripts. Run the following:
$ reloc_perl
It won't print anything but will do its job updating the sh-bang in every script in dwimperl-linux-5.20.1-10-x86_64/perl/bin/. After that we can use perldoc as well:
$ perldoc HTML::Template

Installing new modules

$ perldoc Acme::Bleach
will tell you that the Acme::Bleach module cannot be found. No surprise there, it was not included in this release. Type:
$ cpanm Acme::Bleach
You will see output like this:
--> Working on Acme::Bleach
Fetching http://www.cpan.org/authors/id/D/DC/DCONWAY/Acme-Bleach-1.150.tar.gz ... OK
Configuring Acme-Bleach-1.150 ... OK
Building and testing Acme-Bleach-1.150 ... OK
Successfully installed Acme-Bleach-1.150
1 distribution installed
After that you can already read the docs of Acme::Bleach
$ perldoc Acme::Bleach
and of course you can also use it in your code. If you dare to! You can even check the location of the newly installed Acme::Bleach module:
$ perldoc -l Acme::Bleach
Which in this case was
If you encounter any problem, please open a ticket at dwimperl-linux. If your application needs additional modules you'd like to see added in future versions of DWIM Perl, please open an issue at the same place for consideration. If you'd like to create a derivative distribution, please check out the readme at the same GitHub repo.