![]() |
|
Keep It Simple, Stupid | |
PerlMonks |
Re^2: Update module in offline cpanby Dirk80 (Pilgrim) |
on Jul 13, 2022 at 07:51 UTC ( #11145464=note: print w/replies, xml ) | Need Help?? |
I think that this method would be the right one. But I don't get it to run. Let's assume I'm in an offline environment and I have a tar.gz file I want to update my local offline CPAN with. The tar.gz file could be a change of a module which is NOT available on any remote CPAN mirror. I want to update my local CPAN with the new version of this file changed by myself or got from somewhere else than CPAN. Or it could even be that I want to add a self written package, e.g. My::Package to my local CPAN. What shall I specify for the remote mirror? I think that $path of $minicpan->mirror_file($path) refers to the remote mirror. Furthermore I have here the problem that I'm in an offline environment in the computer I'm using. So minicpan is unable to contact the remote mirror. My remote mirror has to be also local, so that it can be reached offline.
UPDATE1: I see there is an offline option. I'll try with that now. At least the following code is compiling.
But that code just copies My-Package-0.01.tar.gz to C:/Strawberry/cpan directory. But no other files were updated. But that's clear because on C:/Temp I just put the tar.gz file and no more other files. I think I have to make a real cpan mirror containing my self changed files. And then the mirror_file method should work for me. But then I have the same problem as before. I manually have to change all CPAN specific files like CHECKSUMS, ... UPDATE2: I think I know now better what I want. I already have an offline cpan created via CPAN::Mini which just contains files from an official cpan mirror. And now I want to have a second offline cpan archive which contains modules written by myself and bug fixes of cpan modules which are not yet on an official cpan mirror. But what is the best way to build this second cpan offline archive consisting of my own modules if don't want to create all cpan specific files by myself? UPDATE3: I investigated a little bit more. I found a module CPAN::Mini::Inject. It seems that this is the functionality I want. I'm off for two weeks now with no access to computers. I'll try then. I'm now unsure whether I should have two cpan offline archives, one for the official modules of cpan and one for my private modules in the My namespace. Or if it would be better to have everything together in one offline cpan. What is your opinion?
In Section
Seekers of Perl Wisdom
|
|