Search code examples
perlcpan

How to get and keep all perl modules dependencies of a Perl Module


Here is my problem :

I would like to get automatically the dependencies of the XML::Parser module https://metacpan.org/dist/XML-Parser because I need the source for an offline built on multiple different OS and System architectures

I tried with cpan2dist but did not find which option tu use and I also tried to download modules one by one but there just too many dependencies

EDIT :

With your help and advices (many thanks :)) I decided to use Alien::Expat in order to have a full self sufficient package.

I used libexpat 2.2.10 for compliancy with AIX and now my package is built but I have the following error when trying to parse an XML

https://github.com/grantm/XML-SAX-Base/blob/master/BuildSAXBase.pl#L222

Could you please help me make my package use the Expat libraries built with Alien::Expat?

NB : I'm using AIX 7


Solution

  • I finally managed to make my agent work using Alien::Expat and by appending the LIBPATH variable with the path where the libexpat.h has been built

    So, I keep XML::SImple and XML::SAX::Expat as parser and I use Alien::Expat to provide the necessary libraries