Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Redistribute Non-core Modules in Perl?

Tags:

perl

I am relatively new to Perl and I need some help with redistributing the non-core modules. Here's the whole story.

There are two non-core modules that were used in the Perl script: XML::Simple and SOAP::Lite. The version that I'm using (currently on Windows) is Strawberry Perl, so these two modules are already included. However, we don't know if the end users (Unix/Linux system) have these two modules as they might only have the standard version and so have only the core modules. My goal is to make the end users do as little configurations/installs as possible.

First, I tried to see if there's any core modules that's similar to XML::Simple and SOAP::Lite. Unfortunately, I didn't find any (Please correct me if I'm wrong).

So I guess now the only option is to redistribute the two modules. I checked and that these two modules allow redistribution. My problem right now is how to do it. I tried googling with keywords "perl redistribute" but didn't find anything useful. My guess is that we use the exporter tool to achieve this. but these two modules are rather complicated modules and they have several nested folders/pm files (and a whole bunch of other files like MAKE, pod, ini files) so I'm not sure what I should do. The examples I found using exporter are rather simple: They only have 1 pm file and 1 pl file and they are placed into one folder.

Also, I'm open to any other better ways to deal with the problem. The goal is just to make sure all end users can use my script with the least configuration/install efforts as we don't want them to run into a whole bunch of compatibility issues.

Any help would be appreciated. Thanks! =D

like image 614
Hatsune Yuki Avatar asked Dec 15 '22 22:12

Hatsune Yuki


1 Answers

I want to elaborate a little bit on @ikegami said.

SOAP::Lite has a large number of CPAN dependencies, so the people installing your module are going to need CPAN access to get it to build, whether you provide it for them, or list it as a dependency. Otherwise, you'll need to provide your entire dependency tree, at which point, you end up using perlbrew, maybe carton, possibly local::lib, and then you might decide you need the next higher level and produce RPMs and DEBs.

Probably better to just provide your script, packaged as a CPAN module, list your dependencies within, and let the chips fall where they may.

like image 154
Len Jaffe Avatar answered Jan 08 '23 12:01

Len Jaffe