Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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

In reply to Re: using Perl modules on airgapped system by topher
in thread using Perl modules on airgapped system by psyllex

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (8)
As of 2024-04-19 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found