Alien::Libxml2(3)
π Alien::Libxml2 π
okay so bestie, this is a manual page from the User Contributed Perl Documentation, section 3, and it's about a lil module called Alien::Libxml2. It's literally the icon that gets the C libxml2 library onto your system so other Perl stuff can use it. Let's get into it π«Ά
β¨ NAME β¨
Alien::Libxml2 β install the C libxml2 library on your system π
πΈ VERSION πΈ
version 0.20 β that's the one, bestie β¨
π¦ SYNOPSIS π¦
so like, depending on what you're building, you call it a different way. three whole vibes, take your pick:
In your Makefile.PL:
use ExtUtils::MakeMaker;
use Alien::Base::Wrapper ();
WriteMakefile(
Alien::Base::Wrapper->new('Alien::Libxml2')->mm_args2(
# MakeMaker args
NAME => 'My::XS',
...
),
);
In your Build.PL:
use Module::Build;
use Alien::Base::Wrapper qw( Alien::Libxml2 !export );
my $builder = Module::Build->new(
...
configure_requires => {
'Alien::Libxml2' => '0',
...
},
Alien::Base::Wrapper->mb_args,
...
);
$build->create_build_script;
In your FFI::Platypus script or module:
use FFI::Platypus;
use Alien::Libxml2;
my $ffi = FFI::Platypus->new(
lib => [ Alien::Libxml2->dynamic_libs ],
);
no cap, that's the whole flow. pick the one that matches your build system and go off π
π DESCRIPTION π
This module provides libxml2 for other modules to use. that's it, that's the job, and it does it flawlessly π
π CAVEATS π
okay so listen up because this part matters:
- There was an older existing
Alien::LibXML, but it uses the olderAlien::Build::ModuleBuildand the author prefers this version, which is based on the more robustalienfilesystem. periodt. π libxml2has some optional prereqs, includingzlibandiconv. For ashareinstall you will want to make sure that these are installed prior to installingAlien::Libxml2if you want to make use of features relying on them. yes, order matters bestie π- For a system install, you want to make sure the development packages for
libxml2,zlibandiconvare installed iflibxml2has been configured to use them, otherwiseXML::LibXMLwill not install as expected. If the tests for this module fail with a missingiconv.horzlib.h, then this is likely the reason. π«
bestie. if it's failing and you seeiconv.horzlib.hin the error, it's this. it's always this. go install the dev packages and come back π
π SEE ALSO π
Alien::LibXMLβ Older Alien for the same library.XML::LibXMLβ Perl interface tolibxml2, which uses this Alien.
π AUTHOR π
Author: Graham Ollis <plicease@cpan.org>
Contributors:
- Shlomi Fish (
shlomif) - Shawn Laffan (
SLAFFAN)
shoutout to the whole squad for making this happen π«Άβ¨
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2013-2024 by Graham Ollis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole page, bestie!! πβ¨π
cute lil sign-off: this one came from perl version v5.42.0, dated 2025-07-25 πΈ go forth and link your XML, you've got this ππ
π¦ where this page comes from
- fedora 43: perl-Alien-Libxml2 0.20-2.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms