This is a distribution of perl 5.20.1 with a some additional CPAN-modules.
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.
$ 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_perlIn 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.shThat's it. Now you can run perl -v and see the new version of perl. To install additional CPAN modules type
$ cpanm Module::Name
released between 2014.09.25 and 2014.10.02.
$ 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.gzThen we can try if it works by typing:
$ ./dwimperl-linux-5.20.1-10-x86_64/perl/bin/perl -vThis 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 -VThat will give the following output:
Summary of my perl5 (revision 5 version 20 subversion 1) configuration: Platform: 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 Compiler: cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', 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 gnulibc_version='2.5' 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): Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF Built under linux Compiled at Sep 24 2014 07:38:36 @INC: /home/other/dwimperl-linux-5.20.1-10-x86_64/perl/lib/site_perl/5.20.1/x86_64-linux /home/other/dwimperl-linux-5.20.1-10-x86_64/perl/lib/site_perl/5.20.1 /home/other/dwimperl-linux-5.20.1-10-x86_64/perl/lib/5.20.1/x86_64-linux /home/other/dwimperl-linux-5.20.1-10-x86_64/perl/lib/5.20.1 .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.shThis 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 /home/other/dwimperl-linux-5.20.1-10-x86_64/perl/bin/perlAfter this we can run
$ perl -v $ perl -Vand see the results as before.
$ 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 directoryThat 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::TemplateDWIM Perl for Linux includes a script called reloc_perl that will update the sh-bang lines of the scripts. Run the following:
$ reloc_perlIt 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
$ perldoc Acme::Bleachwill tell you that the Acme::Bleach module cannot be found. No surprise there, it was not included in this release. Type:
$ cpanm Acme::BleachYou 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 installedAfter that you can already read the docs of Acme::Bleach
$ perldoc Acme::Bleachand 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::BleachWhich in this case was
/home/other/dwimperl-linux-5.20.1-10-x86_64/perl/lib/site_perl/5.20.1/x86_64-linux/Acme/Bleach.pmIf 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.