Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: RFC: Private CPAN In A Box

by thargas (Deacon)
on May 24, 2011 at 12:04 UTC ( [id://906477]=note: print w/replies, xml ) Need Help??


in reply to RFC: Private CPAN In A Box

I've found that what I really want is the ability to install, centrally, multiple versions of perl modules and have a way for scripts to point at which version of each (non-core) module they want. It is a pain having to enumerate the version of each module you want, but without this, upgrading any module is a potential downtime.

Even if all modules signaled broken backwards compatibility by the version number, which they don't, it wouldn't help this problem because of all the existing scripts, which were written for the old version of the module, may break when you upgrade such a module. You can find most of these scripts by searching for "use SomeModule", but then someone will be clever and load the module at runtime with require... Until perl can (out of the box) deal with this, it's a dangerous thing to use in a large scale environment. Don't get me wrong, I prefer perl, but I'm also sure that anyone who has used perl in an enterprise environment has been bitten by this problem. Things like PAR can help, but they require more effort to package the script for deployment.

Replies are listed 'Best First'.
Re^2: RFC: Private CPAN In A Box
by Anonymous Monk on May 24, 2011 at 12:43 UTC
    Until perl can (out of the box) deal with this, it's a dangerous thing to use in a large scale environment.

    The out-of-the-box solution is to have per-application module bundles, or perl installs. So each application which requires many and potentially incompatible prerequisites, gets its own local::lib, its simple

    $ENV{PERL_MM_USE_DEFAULT}=1; $ENV{PERL_MB_OPT}='--install_base /some/path/appxyzv23/perl5'; $ENV{PERL_MM_OPT}='INSTALL_BASE=/some/path/appxyzv23/perl5'; use strict; use warnings; use CPAN; CPAN::Shell->install(qw[ AUTHOR/Module-1.23.tar.gz ... ]); ... use lib '/some/path/appxyzv23/perl5';

    There is also only - Load specific module versions; Install many

Re^2: RFC: Private CPAN In A Box
by sundialsvc4 (Abbot) on May 25, 2011 at 01:20 UTC

    Hmmm... I was wondering about that, lately.   You see, I inherited a big, ugly application that does a lot of RESTful calls.   To its credit, there is an extremely consistent logic to the way those calls are done, and the implementation is as orthagonal and “tight” as one might wish for ... but it’s mod_perl, and it’s big.

    So, one of the things that I did to it ... and now I’m wondering about the “goodness” of it ... is to require each of the REST handlers when, and if, a call to that handler actually comes in.   (All of the possible handlers originate from exactly one name-space, so it isn’t like we don’t have a complete list of what modules could be invoked.)   The idea is to demand-load those handlers which might not be routinely used in every lifespan of a particular Apache process, in hope that these processes might use considerably fewer megabytes apiece than they once did.

    Did I sin?   Must I do penance?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://906477]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2024-03-29 13:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found