Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Carrying (mini)CPAN

by fishy (Pilgrim)
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
[Corion]: Hurr. Yesterday I played around with ffmpeg as a new toy and found its "scene" filter great - it detects scene changes. Now I could write a module that splits a given video on its cuts into different scenes. Except I have no use case for that :)
[Corion]: (and also, writing yet another FFmpeg module just to wrap system() and grep through its output isn't all that great ...)

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (10)
As of 2018-05-24 11:10 GMT
Find Nodes?
    Voting Booth?