xref: /freebsd-src/crypto/openssl/NOTES-PERL.md (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1*b077aed3SPierre ProncheryNotes on Perl
2*b077aed3SPierre Pronchery=============
3*b077aed3SPierre Pronchery
4*b077aed3SPierre Pronchery - [General Notes](#general-notes)
5*b077aed3SPierre Pronchery - [Perl on Windows](#perl-on-windows)
6*b077aed3SPierre Pronchery - [Perl on VMS](#perl-on-vms)
7*b077aed3SPierre Pronchery - [Perl on NonStop](#perl-on-nonstop)
8*b077aed3SPierre Pronchery - [Required Perl modules](#required-perl-modules)
9*b077aed3SPierre Pronchery - [Notes on installing a Perl module](#notes-on-installing-a-perl-module])
10*b077aed3SPierre Pronchery
11*b077aed3SPierre ProncheryGeneral Notes
12*b077aed3SPierre Pronchery-------------
13*b077aed3SPierre Pronchery
14*b077aed3SPierre ProncheryFor our scripts, we rely quite a bit on Perl, and increasingly on
15*b077aed3SPierre Proncherysome core Perl modules.  These Perl modules are part of the Perl
16*b077aed3SPierre Proncherysource, so if you build Perl on your own, you should be set.
17*b077aed3SPierre Pronchery
18*b077aed3SPierre ProncheryHowever, if you install Perl as binary packages, the outcome might
19*b077aed3SPierre Proncherydiffer, and you may have to check that you do get the core modules
20*b077aed3SPierre Proncheryinstalled properly.  We do not claim to know them all, but experience
21*b077aed3SPierre Proncheryhas told us the following:
22*b077aed3SPierre Pronchery
23*b077aed3SPierre Pronchery - on Linux distributions based on Debian, the package `perl` will
24*b077aed3SPierre Pronchery   install the core Perl modules as well, so you will be fine.
25*b077aed3SPierre Pronchery - on Linux distributions based on RPMs, you will need to install
26*b077aed3SPierre Pronchery   `perl-core` rather than just `perl`.
27*b077aed3SPierre Pronchery
28*b077aed3SPierre ProncheryYou MUST have at least Perl version 5.10.0 installed.  This minimum
29*b077aed3SPierre Proncheryrequirement is due to our use of regexp backslash sequence \R among
30*b077aed3SPierre Proncheryother features that didn't exist in core Perl before that version.
31*b077aed3SPierre Pronchery
32*b077aed3SPierre ProncheryPerl on Windows
33*b077aed3SPierre Pronchery---------------
34*b077aed3SPierre Pronchery
35*b077aed3SPierre ProncheryThere are a number of build targets that can be viewed as "Windows".
36*b077aed3SPierre ProncheryIndeed, there are `VC-*` configs targeting VisualStudio C, as well as
37*b077aed3SPierre ProncheryMinGW and Cygwin. The key recommendation is to use a Perl installation
38*b077aed3SPierre Proncherythat matches the build environment. For example, if you will build
39*b077aed3SPierre Proncheryon Cygwin be sure to use the Cygwin package manager to install Perl.
40*b077aed3SPierre ProncheryFor MSYS builds use the MSYS provided Perl.
41*b077aed3SPierre ProncheryFor VC-* builds we recommend Strawberry Perl, from <http://strawberryperl.com>.
42*b077aed3SPierre ProncheryAn alternative is ActiveState Perl, from <http://www.activestate.com/ActivePerl>
43*b077aed3SPierre Proncheryfor which you may need to explicitly select the Perl module Win32/Console.pm
44*b077aed3SPierre Proncheryavailable via <https://platform.activestate.com/ActiveState>.
45*b077aed3SPierre Pronchery
46*b077aed3SPierre ProncheryPerl on VMS
47*b077aed3SPierre Pronchery-----------
48*b077aed3SPierre Pronchery
49*b077aed3SPierre ProncheryYou will need to install Perl separately.  One way to do so is to
50*b077aed3SPierre Proncherydownload the source from <http://perl.org/>, unpacking it, reading
51*b077aed3SPierre Pronchery`README-VMS.md` and follow the instructions.  Another way is to download a
52*b077aed3SPierre Pronchery`.PCSI` file from <http://www.vmsperl.com/> and install it using the
53*b077aed3SPierre ProncheryPOLYCENTER install tool.
54*b077aed3SPierre Pronchery
55*b077aed3SPierre ProncheryPerl on NonStop
56*b077aed3SPierre Pronchery---------------
57*b077aed3SPierre Pronchery
58*b077aed3SPierre ProncheryPerl is installed on HPE NonStop platforms as part of the Scripting Languages
59*b077aed3SPierre Proncherypackage T1203PAX file. The package is shipped as part of a NonStop RVU
60*b077aed3SPierre Pronchery(Release Version Updates) package. Individual SPRs (Software Product Release)
61*b077aed3SPierre Proncheryrepresenting fixes can be obtained from the Scout website at
62*b077aed3SPierre Pronchery<https://h22204.www2.hpe.com/NEP>. Follow the appropriate set of installation
63*b077aed3SPierre Proncheryinstructions for your operating system release as described in the
64*b077aed3SPierre ProncheryScript Language User Guide available from the NonStop Technical Library.
65*b077aed3SPierre Pronchery
66*b077aed3SPierre ProncheryRequired Perl modules
67*b077aed3SPierre Pronchery---------------------
68*b077aed3SPierre Pronchery
69*b077aed3SPierre ProncheryWe do our best to limit ourselves to core Perl modules to keep the
70*b077aed3SPierre Proncheryrequirements down. There are just a few exceptions.
71*b077aed3SPierre Pronchery
72*b077aed3SPierre Pronchery * Text::Template this is required *for building*
73*b077aed3SPierre Pronchery
74*b077aed3SPierre Pronchery   To avoid unnecessary initial hurdles, we include a copy of this module
75*b077aed3SPierre Pronchery   in the source. It will work as a fallback if the module isn't already
76*b077aed3SPierre Pronchery   installed.
77*b077aed3SPierre Pronchery
78*b077aed3SPierre Pronchery * `Test::More` this is required *for testing*
79*b077aed3SPierre Pronchery
80*b077aed3SPierre Pronchery   We require the minimum version to be 0.96, which appeared in Perl 5.13.4,
81*b077aed3SPierre Pronchery   because that version was the first to have all the features we're using.
82*b077aed3SPierre Pronchery   This module is required for testing only!  If you don't plan on running
83*b077aed3SPierre Pronchery   the tests, you don't need to bother with this one.
84*b077aed3SPierre Pronchery
85*b077aed3SPierre ProncheryNotes on installing a Perl module
86*b077aed3SPierre Pronchery---------------------------------
87*b077aed3SPierre Pronchery
88*b077aed3SPierre ProncheryThere are a number of ways to install a perl module.  In all
89*b077aed3SPierre Proncherydescriptions below, `Text::Template` will serve as an example.
90*b077aed3SPierre Pronchery
91*b077aed3SPierre Pronchery1. for Linux users, the easiest is to install with the use of your
92*b077aed3SPierre Pronchery   favorite package manager.  Usually, all you need to do is search
93*b077aed3SPierre Pronchery   for the module name and to install the package that comes up.
94*b077aed3SPierre Pronchery
95*b077aed3SPierre Pronchery   On Debian based Linux distributions, it would go like this:
96*b077aed3SPierre Pronchery
97*b077aed3SPierre Pronchery       $ apt-cache search Text::Template
98*b077aed3SPierre Pronchery       ...
99*b077aed3SPierre Pronchery       libtext-template-perl - perl module to process text templates
100*b077aed3SPierre Pronchery       $ sudo apt-get install libtext-template-perl
101*b077aed3SPierre Pronchery
102*b077aed3SPierre Pronchery   Perl modules in Debian based distributions use package names like
103*b077aed3SPierre Pronchery   the name of the module in question, with "lib" prepended and
104*b077aed3SPierre Pronchery   "-perl" appended.
105*b077aed3SPierre Pronchery
106*b077aed3SPierre Pronchery2. Install using CPAN.  This is very easy, but usually requires root
107*b077aed3SPierre Pronchery   access:
108*b077aed3SPierre Pronchery
109*b077aed3SPierre Pronchery       $ cpan -i Text::Template
110*b077aed3SPierre Pronchery
111*b077aed3SPierre Pronchery   Note that this runs all the tests that the module to be installed
112*b077aed3SPierre Pronchery   comes with.  This is usually a smooth operation, but there are
113*b077aed3SPierre Pronchery   platforms where a failure is indicated even though the actual tests
114*b077aed3SPierre Pronchery   were successful.  Should that happen, you can force an
115*b077aed3SPierre Pronchery   installation regardless (that should be safe since you've already
116*b077aed3SPierre Pronchery   seen the tests succeed!):
117*b077aed3SPierre Pronchery
118*b077aed3SPierre Pronchery       $ cpan -f -i Text::Template
119*b077aed3SPierre Pronchery
120*b077aed3SPierre Pronchery   Note: on VMS, you must quote any argument that contains upper case
121*b077aed3SPierre Pronchery   characters, so the lines above would be:
122*b077aed3SPierre Pronchery
123*b077aed3SPierre Pronchery       $ cpan -i "Text::Template"
124*b077aed3SPierre Pronchery
125*b077aed3SPierre Pronchery   and:
126*b077aed3SPierre Pronchery
127*b077aed3SPierre Pronchery       $ cpan -f -i "Text::Template"
128