Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

"Copying" Strawberry Perl Modules from my laptop to Servers.

by perl514 (Pilgrim)
on Oct 28, 2013 at 13:41 UTC ( #1059983=perlquestion: print w/ replies, xml ) Need Help??
perl514 has asked for the wisdom of the Perl Monks concerning the following question:

Respected Monks,

I have installed Strawberry Perl 5.16.3 on my personal laptop and therefore installing a module is not a problem. However, I am planning to install Strawberry Perl on a few management servers. I just need a few modules, such as Net:SSH2, Excel::Writer::XLSX, MIME::Lite and a couple more.

I can copy the modules on the server and install them, but if these modules list out dependencies, then I'll have to do the same for the dependencies as well.

Is there a way that I can simply "copy" or "replicate" what I have on my laptop onto the Servers?

My plan is, to install all the required modules on my laptop, install Strawberry Perl on the servers and then move a few directories from my laptop to the servers so that I can use the modules.

Is this possible?

Perlpetually Indebted To PerlMonks

Comment on "Copying" Strawberry Perl Modules from my laptop to Servers.
Re: "Copying" Strawberry Perl Modules from my laptop to Servers.
by ww (Bishop) on Oct 28, 2013 at 13:55 UTC
    It may ... or may NOT... be possible; more likely, the latter.

    That would depend on processor, compiler, OS, dir structure (and probably other factors which should be "slapping me up sidda' my head.") If those were to all come together nicely, the answer is still just 'maybe... but not worth the effort, even if you have to sneaker-net the appropriate modules onto the server (hint: cpan should help you avoid the dependency-hell you fear).

    And it's a bad idea, in any case.

Re: "Copying" Strawberry Perl Modules from my laptop to Servers.
by atcroft (Monsignor) on Oct 28, 2013 at 14:34 UTC

    It may be a better idea to use the autobundle command in the CPAN shell (perl -MCPAN -e "autobundle;"), which generates a list of installed modules, then upload that listing to an appropriate location on each server and install the bundle (perl -MCPAN -e "install Bundle::Snapshot_2013_10_28_00;").

    (Bonus: Look at Order your autobundle by dependency to reorder the listing of modules such that dependencies are installed earlier.)

    Hope that helps.

Re: "Copying" Strawberry Perl Modules from my laptop to Servers.
by perl514 (Pilgrim) on Oct 28, 2013 at 14:35 UTC

    Hi ww,

    Thank you for the reply. The management servers are not open to the outside world. So I cannot install modules straight off the cpan. Thats the reason why I have to take this convoluted approach. Any help/pointers would be sincerely appreciated.

    Perlpetually Indebted To PerlMonks

      In that case, you may consider uploading the sources subdirectory as well. I believe (untested) that having that and the bundle may (untested) give you what you need....

      For that matter, build a miniCPAN archive in a location accessible to the servers, upload the sources you need to it, and away you can go. (It may also be quicker, since files would be available locally instead of across the Internet, and you would have better control of the versions available.)

      Hope that helps.

      Update: 2013-10-28 - Added miniCPAN suggestion.

      Update: 2013-10-28 - Changed links from mini-CPAN to miniCPAN, for (hopefully) better Super Search results.

Re: "Copying" Strawberry Perl Modules from my laptop to Servers.
by daxim (Chaplain) on Oct 28, 2013 at 14:38 UTC
Re: "Copying" Strawberry Perl Modules from my laptop to Servers.
by dasgar (Deacon) on Oct 28, 2013 at 15:27 UTC

    One route you could go is to leverage Strawberry Perl's portable edition. Download and unzip that on your laptop, then install the desired modules and then copy all of that to the servers. If you don't want to run their batch file every time you use Perl on the servers, you should be able to set your servers' environment variables to match what their batch file is setting.

Re: "Copying" Strawberry Perl Modules from my laptop to Servers.
by perl514 (Pilgrim) on Oct 28, 2013 at 17:54 UTC

    Hi All,

    Thank you very much for taking time to reply. I will try the suggestions given here.

    Perlpetually Indebted To PerlMonks

Re: "Copying" Strawberry Perl Modules from my laptop to Servers.
by Anonymous Monk on Oct 28, 2013 at 18:12 UTC
    Most Perl modules have some "executable code" component ... "XS" ... and frequently they use libraries (DLLs) and set up at install-time the options for getting to those. Therefore, you should not expect, in the general case, for any module to work successfully just by "copying it."
Re: "Copying" Strawberry Perl Modules from my laptop to Servers.
by Anonymous Monk on Oct 29, 2013 at 00:14 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1059983]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (10)
As of 2014-12-27 17:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls