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

Carrying (mini)CPAN

by fishy (Monk)
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.
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/' ...
or by modifying manually ~/.cpan/CPAN/
... '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

Replies are listed 'Best First'.
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.


    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?

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
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2017-03-28 21:42 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (341 votes). Check out past polls.