Discussion:
Transferring CPAN "installs" to another machine
(too old to reply)
Jean-Denis Muys
2009-04-07 15:46:44 UTC
Permalink
Hi,

I am quite a newbie with Perl and CPAN, so please bear with me.

I have been developping a custom application in Perl for a few weeks for a
customer. The customer's machine will not have internet access. My code uses
a few CPAN modules that will not be on the customer's machine.

Therefore I need to deliver both my code and the said CPAN modules, and I'm
not quite sure how I can do that.

My internet search uncovered a few hits which describe how to manually
install without internet access, but it's not quite what I need.

This is because target machine is very bare bone and lacks a number of
tools, including for example a C compiler. So delivering the full set of
building tools is really heavy handed.

My idea was to deliver only the built libraries and required binaries.

The good news is I have a "clone" of the target machine on a virtual
machine, which I can connect to the internet. So I can install and build
everything on that virtual machine, and then copy all the new binaries back
to the actual target machine (using a CD-ROM or a USB thumb drive).

With that in mind, here are my questions:

1) will it be enough to copy all new files in the CPAN installation
directorie(s)?
2) how can I find where CPAN installs its modules? Is it correct to use the
directories stored in the @INC variable?

In my specific case, the target machine is a vanilla CentOS 5.2 Linux
install.

The modules I use include DBI with SQLite3 access, Moose, Log::Log4perl,
File::Path, File::Copy, File::Basename, Text::Iconv with perhaps a few more
coming later.

I hope this is the correct list to ask such questions.

Many thanks for any suggestion.

Jean-Denis
Andy Lester
2009-04-07 15:52:45 UTC
Permalink
Post by Jean-Denis Muys
Hi,
I am quite a newbie with Perl and CPAN, so please bear with me.
I have been developping a custom application in Perl for a few weeks for a
customer. The customer's machine will not have internet access. My code uses
a few CPAN modules that will not be on the customer's machine.
Is the core problem that you need to know what all the modules
installed on one machine are? If so, look at the "autobundle" feature
in the CPAN shell.


--
Andy Lester => ***@petdance.com => www.petdance.com => AIM:petdance
Andreas J. Koenig
2009-04-08 03:33:42 UTC
Permalink
Post by Jean-Denis Muys
In my specific case, the target machine is a vanilla CentOS 5.2 Linux
install.
In this case yu should build RPMs. The open question is how to do that
but it seems that CPANPLUS::Dist::RPM or CPANPLUS::Dist::Fedora should
suit.
--
andreas
Earl Ruby
2009-04-10 17:23:47 UTC
Permalink
On Tue, Apr 7, 2009 at 8:33 PM, Andreas J. Koenig
Post by Andreas J. Koenig
In this case yu should build RPMs. The open question is how to do that
but it seems that CPANPLUS::Dist::RPM or CPANPLUS::Dist::Fedora should
suit.
You might also want to take a look at cpan2rpm. You install a CPAN
package on a machine using the normal method, then:

cpan2rpm Cache::Memcached

... would create an RPM of Cache::Memcached.

http://perl.arix.com/cpan2rpm/
--
Earl Ruby
http://earlruby.org/
Loading...