Blame NOTES.PERL

Packit c4476c
 TOC
Packit c4476c
 ===
Packit c4476c
Packit c4476c
 - Notes on Perl
Packit c4476c
 - Notes on Perl on Windows
Packit c4476c
 - Notes on Perl modules we use
Packit c4476c
 - Notes on installing a perl module
Packit c4476c
Packit c4476c
 Notes on Perl
Packit c4476c
 -------------
Packit c4476c
Packit c4476c
 For our scripts, we rely quite a bit on Perl, and increasingly on
Packit c4476c
 some core Perl modules.  These Perl modules are part of the Perl
Packit c4476c
 source, so if you build Perl on your own, you should be set.
Packit c4476c
Packit c4476c
 However, if you install Perl as binary packages, the outcome might
Packit c4476c
 differ, and you may have to check that you do get the core modules
Packit c4476c
 installed properly.  We do not claim to know them all, but experience
Packit c4476c
 has told us the following:
Packit c4476c
Packit c4476c
 - on Linux distributions based on Debian, the package 'perl' will
Packit c4476c
   install the core Perl modules as well, so you will be fine.
Packit c4476c
 - on Linux distributions based on RPMs, you will need to install
Packit c4476c
   'perl-core' rather than just 'perl'.
Packit c4476c
Packit c4476c
 You MUST have at least Perl version 5.10.0 installed.  This minimum
Packit c4476c
 requirement is due to our use of regexp backslash sequence \R among
Packit c4476c
 other features that didn't exist in core Perl before that version.
Packit c4476c
Packit c4476c
 Notes on Perl on Windows
Packit c4476c
 ------------------------
Packit c4476c
Packit c4476c
 There are a number of build targets that can be viewed as "Windows".
Packit c4476c
 Indeed, there are VC-* configs targeting VisualStudio C, as well as
Packit c4476c
 MinGW and Cygwin. The key recommendation is to use "matching" Perl,
Packit c4476c
 one that matches build environment. For example, if you will build
Packit c4476c
 on Cygwin be sure to use the Cygwin package manager to install Perl.
Packit c4476c
 For MSYS builds use the MSYS provided Perl. For VC-* builds we
Packit c4476c
 recommend ActiveState Perl, available from
Packit c4476c
 http://www.activestate.com/ActivePerl.
Packit c4476c
Packit c4476c
 Notes on Perl on VMS
Packit c4476c
 --------------------
Packit c4476c
Packit c4476c
 You will need to install Perl separately.  One way to do so is to
Packit c4476c
 download the source from http://perl.org/, unpacking it, reading
Packit c4476c
 README.vms and follow the instructions.  Another way is to download a
Packit c4476c
 .PCSI file from http://www.vmsperl.com/ and install it using the
Packit c4476c
 POLYCENTER install tool.
Packit c4476c
Packit c4476c
 Notes on Perl modules we use
Packit c4476c
 ----------------------------
Packit c4476c
Packit c4476c
 We make increasing use of Perl modules, and do our best to limit
Packit c4476c
 ourselves to core Perl modules to keep the requirements down.  There
Packit c4476c
 are just a few exceptions:
Packit c4476c
Packit c4476c
 Test::More         We require the minimum version to be 0.96, which
Packit c4476c
                    appeared in Perl 5.13.4, because that version was
Packit c4476c
                    the first to have all the features we're using.
Packit c4476c
                    This module is required for testing only!  If you
Packit c4476c
                    don't plan on running the tests, you don't need to
Packit c4476c
                    bother with this one.
Packit c4476c
Packit c4476c
 Text::Template     This module is not part of the core Perl modules.
Packit c4476c
                    As a matter of fact, the core Perl modules do not
Packit c4476c
                    include any templating module to date.
Packit c4476c
                    This module is absolutely needed, configuration
Packit c4476c
                    depends on it.
Packit c4476c
Packit c4476c
 To avoid unnecessary initial hurdles, we have bundled a copy of the
Packit c4476c
 following modules in our source.  They will work as fallbacks if
Packit c4476c
 these modules aren't already installed on the system.
Packit c4476c
Packit c4476c
    Text::Template
Packit c4476c
Packit c4476c
 Notes on installing a perl module
Packit c4476c
 ---------------------------------
Packit c4476c
Packit c4476c
 There are a number of ways to install a perl module.  In all
Packit c4476c
 descriptions below, Text::Template will serve as an example.
Packit c4476c
Packit c4476c
 1. for Linux users, the easiest is to install with the use of your
Packit c4476c
    favorite package manager.  Usually, all you need to do is search
Packit c4476c
    for the module name and to install the package that comes up.
Packit c4476c
Packit c4476c
    On Debian based Linux distributions, it would go like this:
Packit c4476c
Packit c4476c
        $ apt-cache search Text::Template
Packit c4476c
        ...
Packit c4476c
        libtext-template-perl - perl module to process text templates
Packit c4476c
        $ sudo apt-get install libtext-template-perl
Packit c4476c
Packit c4476c
    Perl modules in Debian based distributions use package names like
Packit c4476c
    the name of the module in question, with "lib" prepended and
Packit c4476c
    "-perl" appended.
Packit c4476c
Packit c4476c
 2. Install using CPAN.  This is very easy, but usually requires root
Packit c4476c
    access:
Packit c4476c
Packit c4476c
        $ cpan -i Text::Template
Packit c4476c
Packit c4476c
    Note that this runs all the tests that the module to be installed
Packit c4476c
    comes with.  This is usually a smooth operation, but there are
Packit c4476c
    platforms where a failure is indicated even though the actual tests
Packit c4476c
    were successful.  Should that happen, you can force an
Packit c4476c
    installation regardless (that should be safe since you've already
Packit c4476c
    seen the tests succeed!):
Packit c4476c
Packit c4476c
        $ cpan -f -i Text::Template
Packit c4476c
Packit c4476c
    Note: on VMS, you must quote any argument that contains upper case
Packit c4476c
    characters, so the lines above would be:
Packit c4476c
Packit c4476c
        $ cpan -i "Text::Template"
Packit c4476c
Packit c4476c
    and:
Packit c4476c
Packit c4476c
        $ cpan -f -i "Text::Template"