6.24. Perl-5.10.0

The Perl package contains the Practical Extraction and Report Language.

6.24.1. Environment Settings

This package requires compiler variables to be set for the target in the environment.

export CC="${CLFS_TARGET}-gcc"
export CXX="${CLFS_TARGET}-g++"
export AR="${CLFS_TARGET}-ar"
export AS="${CLFS_TARGET}-as"
export RANLIB="${CLFS_TARGET}-ranlib"
export LD="${CLFS_TARGET}-ld"
export STRIP="${CLFS_TARGET}-strip"

6.24.2. Installation of Perl

[Warning]

Warning

Building with CFLAGS or CXXFLAGS set can cause the build to hang or fail.

The following patch fixes issues with Perl and cross-compiling:

patch -Np1 -i ../perl-5.10.0-cross_compile-1.patch

The following sed causes DynaLoader.a to be built with -fPIC so it can be linked into a shared library later:

chmod -v 644 Makefile.SH
cp -v Makefile.SH{,.orig}
sed -e "s@pldlflags=''@pldlflags=\"\$cccdlflags\"@g" \
    -e "s@static_target='static'@static_target='static_pic'@g" Makefile.SH.orig > Makefile.SH

By default, Perl's Compress::Raw::Zlib module builds and links against its own internal copy of Zlib. The following command will tell it use the system-installed Zlib:

sed -i -e '/^BUILD_ZLIB/ s/True/False/' \
        -e '/^INCLUDE\|^LIB/ s|\./zlib-src|/usr/include|' \
        ext/Compress/Raw/Zlib/config.in

The Cross directory contains a Makefile for cross-compiling:

cd Cross

Compile the package:

make ARCH=hppa CROSS_COMPILE=${CLFS_TARGET}-

Install the package:

make DESTDIR=${CLFS} install

6.24.3. Contents of Perl

Installed programs: a2p, c2ph, cpan, dprofpp, enc2xs, find2perl, h2ph, h2xs, instmodsh, libnetcfg, perl, perl5.10.0 (link to perl), perlbug, perldoc, perlivp, piconv, pl2pm, pod2html, pod2latex, pod2man, pod2text, pod2usage, podchecker, podselect, prove, psed (link to s2p), pstruct (link to c2ph), s2p, splain, and xsubpp
Installed libraries: Several hundred which cannot all be listed here

Short Descriptions

a2p

Translates awk to Perl

c2ph

Dumps C structures as generated from cc -g -S

cpan

Shell script that provides a command interface to CPAN.pm

dprofpp

Displays Perl profile data

enc2xs

Builds a Perl extension for the Encode module from either Unicode Character Mappings or Tcl Encoding Files

find2perl

Translates find commands to Perl

h2ph

Converts .h C header files to .ph Perl header files

h2xs

Converts .h C header files to Perl extensions

libnetcfg

Can be used to configure the libnet

instmodsh

A shell script for examining installed Perl modules, and can even create a tarball from an installed module

perl

Combines some of the best features of C, sed, awk and sh into a single swiss-army-knife language

perl5.10.0

A hard link to perl

perlbug

Used to generate bug reports about Perl, or the modules that come with it, and mail them

perldoc

Displays a piece of documentation in pod format that is embedded in the Perl installation tree or in a Perl script

perlivp

The Perl Installation Verification Procedure; it can be used to verify that Perl and its libraries have been installed correctly

piconv

A Perl version of the character encoding converter iconv

pl2pm

A rough tool for converting Perl4 .pl files to Perl5 .pm modules

pod2html

Converts files from pod format to HTML format

pod2latex

Converts files from pod format to LaTeX format

pod2man

Converts pod data to formatted *roff input

pod2text

Converts pod data to formatted ASCII text

pod2usage

Prints usage messages from embedded pod docs in files

podchecker

Checks the syntax of pod format documentation files

podselect

Displays selected sections of pod documentation

prove

A command-line tool for running tests against Test::Harness

psed

A Perl version of the stream editor sed

pstruct

Dumps C structures as generated from cc -g -S stabs

s2p

Translates sed to Perl

splain

Is used to force verbose warning diagnostics in Perl

xsubpp

Converts Perl XS code into C code