Blame NOTES.PERL

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