Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Carrying (mini)CPAN

by fishy (Beadle)
on Apr 05, 2014 at 14:47 UTC ( #1081247=perlmeditation: print w/ replies, xml ) Need Help??

Thanks to minicpan, I keep a local copy of the latest versions hosted on CPAN.
Running minicpan weekly, I keep it up to date.
My .minicpanrc file:
local: /home/netbook/minicpan/miniCPAN_20140405/ remote: http://your.favorite.cpan.mirror/ also_mirror: indices/ls-lR.gz
Now, I want to carry my local minicpan keeping it on a memory stick.
Changing .minicpanrc to:
local: /media/USB16GB/miniCPAN_20140405/ remote: file://home/netbook/minicpan/miniCPAN_20140405/ also_mirror: indices/ls-lR.gz
and running minicpan again, sweeps my minicpan onto my stick.
Fine.
Now, I can install any module offline (as long as specific version dependencies are satisfied).
Just mount my stick and either, first time running cpan:
... Would you like to configure as much as possible automatically? [yes] ... sites for you? (This means connecting to the Internet) [yes] no ... Would you like to pick from the CPAN mirror list? [yes] no ... Please enter your CPAN site: [] file:///mnt/minicpan Enter another URL or ENTER to quit: [] New urllist file:///mnt/minicpan/ Autoconfiguration complete. commit: wrote '/home/userOne/.cpan/CPAN/MyConfig.pm' ...
or by modifying manually ~/.cpan/CPAN/MyConfig.pm
... 'urllist' => [q[file:///mnt/minicpan]], ...
So, it's easy installing modules on offline systems or installing apps on user (e.g. /home/user) Perls.

Have fun!

UPDATE: After discovering how to comment, my .minicpanrc looks like:
## web ---> local disk (computer A) #local: /home/netbook/minicpan/miniCPAN_20140414/ #remote: http://your.favorite.cpan.mirror/ #also_mirror: indices/ls-lR.gz ## local disk (computer A) ---> USB local: /media/USB16GB/miniCPAN_20140414/ remote: file://home/netbook/minicpan/miniCPAN_20140414/ also_mirror: indices/ls-lR.gz ## USB ---> local disk (computer B) #local: /home/dan/miniCPAN/miniCPAN_20140414/ #remote: file://media/usb/miniCPAN_20140414/ #also_mirror: indices/ls-lR.gz

Comment on Carrying (mini)CPAN
Select or Download Code
Re: Carrying (mini)CPAN
by CountZero (Bishop) on Apr 06, 2014 at 12:57 UTC
    I run minicpan every day on my laptop, followed by cpan-outdated (using the --mirror option) and cpanm (using the --mirror-only option pointing to my minicpan repository) so my development machine has always the latest and greatest installed.

    Perhaps not advisable for a production machine though.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://1081247]
Approved by Old_Gray_Bear
Front-paged by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2014-12-19 03:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (70 votes), past polls