Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: using Perl modules on airgapped system

by topher (Scribe)
on Apr 20, 2013 at 03:40 UTC ( #1029610=note: print w/replies, xml ) Need Help??

in reply to using Perl modules on airgapped system

There are a couple of ways you can approach this, depending on your specific requirements and preferences.

First, as a couple people have mentioned, you could look at something like CPAN::Mini. Basically, you'd build a local mirror of the packages you'd need. I'd probably look at this option if I had multiple machines I needed to install to.

The rest of the options assume you have a dev box that is similar to your deployment target, where you can do your initial work.

The second option would be to make use of something like App::FatPacker to help package up your prerequisites into a single file that you could easily copy over. If the systems are substantially similar outside of the Perl modules, this might be among the easiest. Note: if the Perl modules require any compiled libraries, I'm not sure if App::FatPacker grabs them or now.

Similar to the previous option, you could use local::lib to install all of your CPAN modules, then tar up the whole set and copy it to your destination. This will work provided the systems are very similar. This can also be used with App::FatPacker to simplify things. local::lib also includes lib::core::only to make sure you've got your dependencies clear for things like App::FatPacker.

If the dev box and production box are not similar enough for the above options to work, you could use App::perlbrew to install a complete Perl installation, then install your dependencies, and then tar up the whole mess and copy it to your destination. I've done this successfully, so I know it works. It's probably the most time intensive of the solutions, though.

Christopher Cashell
  • Comment on Re: using Perl modules on airgapped system

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1029610]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2017-06-23 12:14 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (544 votes). Check out past polls.