File Coverage

blib/lib/Alien/Libxml2.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package Alien::Libxml2;
2              
3 2     2   1030468 use strict;
  2         3  
  2         73  
4 2     2   11 use warnings;
  2         9  
  2         112  
5 2     2   9 use base qw( Alien::Base );
  2         3  
  2         627  
6              
7             # ABSTRACT: Install the C libxml2 library on your system
8             our $VERSION = '0.20'; # VERSION
9              
10              
11              
12              
13             1;
14              
15             __END__
16              
17             =pod
18              
19             =encoding UTF-8
20              
21             =head1 NAME
22              
23             Alien::Libxml2 - Install the C libxml2 library on your system
24              
25             =head1 VERSION
26              
27             version 0.20
28              
29             =head1 SYNOPSIS
30              
31             In your Makefile.PL:
32              
33             use ExtUtils::MakeMaker;
34             use Alien::Base::Wrapper ();
35              
36             WriteMakefile(
37             Alien::Base::Wrapper->new('Alien::Libxml2')->mm_args2(
38             # MakeMaker args
39             NAME => 'My::XS',
40             ...
41             ),
42             );
43              
44             In your Build.PL:
45              
46             use Module::Build;
47             use Alien::Base::Wrapper qw( Alien::Libxml2 !export );
48              
49             my $builder = Module::Build->new(
50             ...
51             configure_requires => {
52             'Alien::Libxml2' => '0',
53             ...
54             },
55             Alien::Base::Wrapper->mb_args,
56             ...
57             );
58              
59             $build->create_build_script;
60              
61             In your L<FFI::Platypus> script or module:
62              
63             use FFI::Platypus;
64             use Alien::Libxml2;
65              
66             my $ffi = FFI::Platypus->new(
67             lib => [ Alien::Libxml2->dynamic_libs ],
68             );
69              
70             =head1 DESCRIPTION
71              
72             This module provides C<libxml2> for other modules to use.
73              
74             =head1 CAVEATS
75              
76             There was an older existing L<Alien::LibXML>, but it uses the older
77             L<Alien::Build::ModuleBuild> and the author prefers this version which
78             is based on the more robust L<alienfile> system.
79              
80             C<libxml2> has some optional prereqs, including C<zlib> and C<iconv>.
81             For a C<share> install you will want to make sure that these are installed
82             prior to installing L<Alien::Libxml2> if you want to make use of features
83             relying on them.
84              
85             For a system install, you want to make sure the development packages for
86             C<libxml2>, C<zlib> and C<iconv> are installed if C<libxml2> has been
87             configured to use them, otherwise L<XML::LibXML> will not install as
88             expected. If the tests for this module fail with a missing C<iconv.h>
89             or C<zlib.h>, then this is likely the reason.
90              
91             =head1 SEE ALSO
92              
93             =over 4
94              
95             =item L<Alien::LibXML>
96              
97             Older Alien for the same library.
98              
99             =item L<XML::LibXML>
100              
101             Perl interface to C<libxml2>, which uses this L<Alien>
102              
103             =back
104              
105             =head1 AUTHOR
106              
107             Author: Graham Ollis E<lt>plicease@cpan.orgE<gt>
108              
109             Contributors:
110              
111             Shlomi Fish (shlomif)
112              
113             Shawn Laffan (SLAFFAN)
114              
115             =head1 COPYRIGHT AND LICENSE
116              
117             This software is copyright (c) 2013-2024 by Graham Ollis.
118              
119             This is free software; you can redistribute it and/or modify it under
120             the same terms as the Perl 5 programming language system itself.
121              
122             =cut