Raise an error on syscall failure in tls_retry_write_records
[openssl.git] / NOTES-PERL.md
1 Notes on Perl
2 =============
3
4  - [General Notes](#general-notes)
5  - [Perl on Windows](#perl-on-windows)
6  - [Perl on VMS](#perl-on-vms)
7  - [Required Perl modules](#required-perl-modules)
8  - [Notes on installing a Perl module](#notes-on-installing-a-perl-module])
9
10
11 General Notes
12 -------------
13
14 For our scripts, we rely quite a bit on Perl, and increasingly on
15 some core Perl modules.  These Perl modules are part of the Perl
16 source, so if you build Perl on your own, you should be set.
17
18 However, if you install Perl as binary packages, the outcome might
19 differ, and you may have to check that you do get the core modules
20 installed properly.  We do not claim to know them all, but experience
21 has told us the following:
22
23  - on Linux distributions based on Debian, the package `perl` will
24    install the core Perl modules as well, so you will be fine.
25  - on Linux distributions based on RPMs, you will need to install
26    `perl-core` rather than just `perl`.
27
28 You MUST have at least Perl version 5.10.0 installed.  This minimum
29 requirement is due to our use of regexp backslash sequence \R among
30 other features that didn't exist in core Perl before that version.
31
32 Perl on Windows
33 ---------------
34
35 There are a number of build targets that can be viewed as "Windows".
36 Indeed, there are `VC-*` configs targeting VisualStudio C, as well as
37 MinGW and Cygwin. The key recommendation is to use a Perl installation
38 that matches the build environment. For example, if you will build
39 on Cygwin be sure to use the Cygwin package manager to install Perl.
40 For MSYS builds use the MSYS provided Perl.
41 For VC-* builds we recommend Strawberry Perl, from <http://strawberryperl.com>.
42 An alternative is ActiveState Perl, from <http://www.activestate.com/ActivePerl>
43 for which you may need to explicitly select the Perl module Win32/Console.pm
44 available via <https://platform.activestate.com/ActiveState>.
45
46 Perl on VMS
47 -----------
48
49 You will need to install Perl separately.  One way to do so is to
50 download the source from <http://perl.org/>, unpacking it, reading
51 `README-VMS.md` and follow the instructions.  Another way is to download a
52 `.PCSI` file from <http://www.vmsperl.com/> and install it using the
53 POLYCENTER install tool.
54
55 Required Perl modules
56 ---------------------
57
58 We do our best to limit ourselves to core Perl modules to keep the
59 requirements down. There are just a few exceptions.
60
61
62 ## For Building
63
64  * `Text::Template`
65
66    This module is not part of the core Perl modules.
67    As a matter of fact, the core Perl modules do not
68    include any templating module to date.
69    This module is absolutely needed,
70    configuration depends on it.
71
72 ## For Testing
73
74  * `Test::More`
75
76    We require the minimum version to be 0.96, which
77    appeared in Perl 5.13.4, because that version was
78    the first to have all the features we're using.
79    This module is required for testing only!
80    If you don't plan on running the tests,
81    you don't need to bother with this one.
82
83
84
85 To avoid unnecessary initial hurdles, we have bundled a copy of the
86 following modules in our source.  They will work as fallbacks if
87 these modules aren't already installed on the system.
88
89    Text::Template
90
91 Notes on installing a Perl module
92 ---------------------------------
93
94 There are a number of ways to install a perl module.  In all
95 descriptions below, `Text::Template` will serve as an example.
96
97 1. for Linux users, the easiest is to install with the use of your
98    favorite package manager.  Usually, all you need to do is search
99    for the module name and to install the package that comes up.
100
101    On Debian based Linux distributions, it would go like this:
102
103        $ apt-cache search Text::Template
104        ...
105        libtext-template-perl - perl module to process text templates
106        $ sudo apt-get install libtext-template-perl
107
108    Perl modules in Debian based distributions use package names like
109    the name of the module in question, with "lib" prepended and
110    "-perl" appended.
111
112 2. Install using CPAN.  This is very easy, but usually requires root
113    access:
114
115        $ cpan -i Text::Template
116
117    Note that this runs all the tests that the module to be installed
118    comes with.  This is usually a smooth operation, but there are
119    platforms where a failure is indicated even though the actual tests
120    were successful.  Should that happen, you can force an
121    installation regardless (that should be safe since you've already
122    seen the tests succeed!):
123
124        $ cpan -f -i Text::Template
125
126    Note: on VMS, you must quote any argument that contains upper case
127    characters, so the lines above would be:
128
129        $ cpan -i "Text::Template"
130
131    and:
132
133        $ cpan -f -i "Text::Template"