Category: Perl

Building XML::Simple from Perl CPAN

Download XML::Simple from CPAN and then decompress and untar the downloaded file.

root@linux:/tmp # gunzip XML-Simple-2.18.tar.gz
root@linux:/tmp # tar xvf XML-Simple-2.18.tar
XML-Simple-2.18/
XML-Simple-2.18/t/
XML-Simple-2.18/t/1_XMLin.xml
XML-Simple-2.18/t/lib/
XML-Simple-2.18/t/lib/TagsToUpper.pm
XML-Simple-2.18/t/B_Hooks.t
XML-Simple-2.18/t/6_ObjIntf.t
XML-Simple-2.18/t/1_XMLin.t
XML-Simple-2.18/t/srt.xml
XML-Simple-2.18/t/4_MemShare.t
XML-Simple-2.18/t/3_Storable.t
XML-Simple-2.18/t/7_SaxStuff.t
XML-Simple-2.18/t/A_XMLParser.t
XML-Simple-2.18/t/0_Config.t
XML-Simple-2.18/t/subdir/
XML-Simple-2.18/t/subdir/test2.xml
XML-Simple-2.18/t/2_XMLout.t
XML-Simple-2.18/t/5_MemCopy.t
XML-Simple-2.18/t/8_Namespaces.t
XML-Simple-2.18/t/test1.xml
XML-Simple-2.18/t/desertnet.src
XML-Simple-2.18/t/9_Strict.t
XML-Simple-2.18/Changes
XML-Simple-2.18/MANIFEST
XML-Simple-2.18/lib/
XML-Simple-2.18/lib/XML/
XML-Simple-2.18/lib/XML/Simple/
XML-Simple-2.18/lib/XML/Simple/FAQ.pod
XML-Simple-2.18/lib/XML/Simple.pm
XML-Simple-2.18/META.yml
XML-Simple-2.18/maketest
XML-Simple-2.18/README
XML-Simple-2.18/Makefile.PL

root@linux:/tmp # cd XML-Simple-2.18
root@linux:/tmp/XML-Simple-2.18 # ls
Changes lib Makefile.PL maketest MANIFEST META.yml README t

Execute the script Makefile.PL to write the makefile

root@linux:/tmp/XML-Simple-2.18 # perl Makefile.PL
Checking installed modules …
XML::SAX is installed, it will be used by the test suite
Checking if your kit is complete…
Looks good
Writing Makefile for XML::Simple

Run make

root@linux:/tmp/XML-Simple-2.18 # make
cp lib/XML/Simple/FAQ.pod blib/lib/XML/Simple/FAQ.pod
cp lib/XML/Simple.pm blib/lib/XML/Simple.pm
Manifying blib/man3/XML::Simple::FAQ.3pm
Manifying blib/man3/XML::Simple.3pm

If you wish, you can skip to make install. Here I check if make test throw any error messages to my screen

root@linux:/tmp/XML-Simple-2.18 # make test
PERL_DL_NONLAZY=1 /usr/bin/perl “-MExtUtils::Command::MM” “-e” “test_harness(0, ‘blib/lib’, ‘blib/arch’)” t/*.t
# Package Version
# perl 5.8.5
# XML::Simple 2.18
# Storable 2.13
# XML::Parser 2.34
# XML::SAX 0.12
# XML::NamespaceSupport 1.08
# XML::SAX::PurePerl 0.90
# XML::LibXML::SAX::Parser 1.50
# XML::LibXML::SAX 1.00 (default parser)
t/0_Config……..ok
t/1_XMLin………ok
t/2_XMLout……..ok
1/201 skipped: Tie::IxHash not installed
t/3_Storable……ok
t/4_MemShare……ok
t/5_MemCopy…….ok
t/6_ObjIntf…….ok
t/7_SaxStuff……ok
t/8_Namespaces….ok
t/9_Strict……..ok
t/A_XMLParser…..ok
t/B_Hooks………ok
3/12 skipped: Tie::IxHash not installed
All tests successful, 4 subtests skipped.
Files=12, Tests=496, 12 wallclock secs ( 1.75 cusr + 0.41 csys = 2.16 CPU)

Then I install the files

root@linux:/tmp/XML-Simple-2.18 # make install
Installing /usr/lib/perl5/site_perl/5.8.5/XML/Simple.pm
Installing /usr/lib/perl5/site_perl/5.8.5/XML/Simple/FAQ.pod
Installing /usr/share/man/man3/XML::Simple::FAQ.3pm
Installing /usr/share/man/man3/XML::Simple.3pm
Writing /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/auto/XML/Simple/.packlist
Appending installation info to /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/perllocal.pod