Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: RFC: Private CPAN In A Box

by thargas (Deacon)
on May 24, 2011 at 12:04 UTC ( #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 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?

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://906477]
[oiskuu]: Hm. that depends on kernel compiled with CONFIG_AUDITSYSCAL L
[tye]: apropos my several mentions of audit
[Corion]: At least my (non-SELinux) Debian has that config thing set. I don't have non-Debian machines handy (except Android)
[Corion]: My Android phone also has /proc/self/ loginuid, but that displays -1 (resp. 4GB). That might be because the phone is rooted.
[tye]: -1 means nobody logged in or the process was started before audit got booted
[davido]: ok, on my ubuntu system getlogin grabs from /proc/self/ loginuid (per strace)

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2017-06-23 19:58 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (554 votes). Check out past polls.