in reply to Re: loading libxml2 as a prerequisite
in thread loading libxml2 as a prerequisite

It's not the fault of Alien::LibXML. It installs libxml and, if asked, supplies the location. The problem is that nobody is asking. (Alien::LibXML can't simply install libXML in, for example, /usr/lib, because it doesn't have the authority to do so. Also, different distros put libraries in different places and/or might have an older version the distro needs.)

Even when your module says it depends on Alien::LibXML and XML::LibXML, the cpan installer doesn't automatically tell each module it's installing about any other modules. If a module needs information about other modules, it has to get that information itself.

In the case of XML::LibXML, if it's Build.pl (or whatever it uses) can't find libxml, it could then try to require Alien::LibXML. If that succeeds, it could then ask Alien::LibXML where libXML is.

Update: However, I don't think there's a way to make a conditional dependency. If libxml were already installed, Alien::LibXML could skip installing it (unless the user specified otherwise), Alien::LibXML itself would still get installed if listed as a dependency by another module.

  • Comment on Re^2: loading libxml2 as a prerequisite

Replies are listed 'Best First'.
Re^3: loading libxml2 as a prerequisite
by jandrew (Chaplain) on Nov 19, 2014 at 18:17 UTC

    As I mentioned in my first post this question has taken me down a path in perl that I rarely travel. (That is a good thing) I would like to thank the monks for their general patience.

    On the resolution front it appears that the root cause of my initial issue is that the libxml2-dev libraries also need to be installed incremental to the libxml2 libraries in order for XML::LibXML to be installed. I am now in the process of figuring that out.