in reply to perlbrew: moving to a new perl with all current modules

++ I liked the overall technique you've used here. Here's a few thoughts:

"... restore all modules in minutes ... " - I question the time you estimate here; although, as I don't use cpanm, I'm happy to be advised otherwise.

Is there a reason for sort in the 1st line? I might have used: s/sort -u/uniq/.

The output from the 3rd line is likely to be quite lengthy. Consider adding  > /tmp/pms_out 2>&1. You can use tail -f if you want to view the output and you have a full history if anything goes wrong.

Update: s/is you want/if you want/

-- Ken

Replies are listed 'Best First'.
Re^2: perlbrew: moving to a new perl with all current modules
by zgrim (Friar) on Jun 13, 2012 at 12:54 UTC

    Yes, the time estimate might be optimistic, depends on many things, of course, module list size, disk & network speed, cpu, etc. The important thing is it is non-interactive, you don't have to sit around answering author questions :) (eg: just hitting Enter some 2h later - when coming back to it - to a "stuck" (Y/n)) so in the end it just might feel faster, given you are free to do other important things (eg: coffee/tea) meanwhile. Skipping tests makes it way faster (cpanm -n), but let noone hear us, it's frowned upon with good reason. :)

    I prefer the sort for two small reasons, 1. eases a bit the visual inspection before install, and 2. upon progress inspection you might wanna know which letter it's at, has an irrational but human "progress bar" feel to it. :)

    Sure, you can output to some log and tail it,

    cpanm -v </tmp/pms &>>/tmp/inst.log & tail -f /tmp/inst.log
    , but i usually just hit M-s error in my urxvtc.


    --
    perl -MLWP::Simple -e'print$_[rand(split(q.%%\n., get(q=http://cpan.org/misc/japh=)))]'