Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
You can be more specific in the command to CPAN, and tell it to install a specific version, if it still is on CPAN. For that, you have to prefix it with (at least) the initials of the author plus a slash, specify the distribution name, and don't forget to append ".tar.gz". (The latter is a mistake in the design of the CPAN API, IMO.)

For example:

perl -MCPAN -e install -e shift YVES/MIME-Lite-3.01_05.tar.gz
if you want to install a specific developer version from MIME::Lite.

Note that I passed the module name through @ARGV (with shift) because it's not a bareword. I find it a bit easier than quoting.

I also heard like we can take a snapshot of the CPAN modules installed in the server.

So is that I can copy the snapshot directly to the destination server.

Well, sort of... you can make a list of the currently installed modules using autobundle in the CPAN shell. The result is a Bundle "module", which, if you install it, will install the modules in it; so it's best to weed out all the stuff you don't need, or don't want to touch. (Last I tried, years ago, it tried to reinstall core modules.) I'm not sure it'll indeed try to match up the version. It might: the data is present.

If it doesn then you can still make a script out of the list of items you want, and then you can install them automatically, at least, for the time that version is still on CPAN.

If the architecture is identical, or if the modules don't depend on the architecture, you can indeed make a copy of the file trees for these modules. Better still is to use the directories that make builds when you test or install a module. That's basically what PPM does, too.

It must be possible to automate making a tarball that.


In reply to Re: perl modules replication by bart
in thread perl modules replication by palette

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 meditating upon the Monastery: (5)
As of 2024-04-20 14:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found