go ahead... be a heretic | |
PerlMonks |
Offline cpan used by strawberry perlby Dirk80 (Pilgrim) |
on Jan 31, 2020 at 13:56 UTC ( [id://11112178]=perlquestion: print w/replies, xml ) | Need Help?? |
Dirk80 has asked for the wisdom of the Perl Monks concerning the following question: I'm using Strawberry Perl (64-bit) Portable 5.30.1.1-64bit in a Windows 7 OS here. I used minicpan to download the cpan to a local directory D:\Perl\strawberry\cpan\sources. My portable strawberry perl is in the directory D:\Perl\strawberry. I had a look at the Config.pm located in D:\Perl\strawberry\perl\lib\CPAN I only adapted the path in the following lines:
After opening the portableshell.bat, I enter cpan and then the cpan-shell appears. Then I tried to install a module via install Text::Trim and it worked fine. Some days later I tried again to install a module. But it did not work. The cpan-shell complained that it could not find 01mailrc.txt.gz although it was there. And then was using LWP to try to download it instead of using my local one. After some investigation I could discover that the cpan-shell always tries to download this file again if its date is not of today. So I changed the code in the Config.pm at the beginning as follows:
It worked again. But this cannot be the right way to do it. How do I have to config cpan properly that it uses my offline cpan although in the net there would be a newer cpan-archive? I just want to use the cpan-archive I downloaded via minicpan offline. Then I have seen that there exists a per user config for cpan too, i.e. /.cpan/CPAN/MyConfig.pm. In my case this file is not present at the moment. Should I use it? I know that this is a common topic and already often discussed. But nevertheless I was not able to find a good solution for my case. Thank you for your help!
Back to
Seekers of Perl Wisdom
|
|