Subject: | Using both "offline" and "extract_check" should update extracted modules |
Using Perl 5.8.8 on Mac OS X 10.5.2
I don't mirror CPAN, but I wanted to scan all modules contents (why is a separate issue - FYI
see rt bug #33419). Since the initial download of the whole of CPAN takes a long time, It
seemed like a good idea to separate the expansion and the download. I used CPAN:Mini by
itself to get all the modules, then tried to use CPAN::Mini::Extract in offline mode to unpack
all the modules.
This did nothing.
After reading the module source, I figured out I could use an (undocumented) command,
"extract_force" to do this the first time, but after that, if I want to run CPAN:Mini and
CPAN::Mini:Extract in a de-coupled way again, it looks like I can't do this without deleting
the previously extracted files and re-extracting everything.
What I would like to happen is that if I run with "offline" and "extract_check" the downloaded
modules will be checked against the extracted modules, and the extracted modules will be
updated to match. This will be a little complicated as expanded files will need to be deleted
as well as added (modules may have been deleted by an un-watched run of CPAN::Mini).
It seems as if this module currently relies on code in CPAN::Mini to call over-ridden methods
every time it runs. Since this is not available in offline mode, it may be hard to provide this
"local expansion mirroring" behavior in an offline situation. However, without this behavior, I
can't see much use for the offline mode.
A more robust "offline" mode would also be useful to fix odd situations, where for some
reason the directories get out of sync. As it now, only difference between the remote CPAN
and the local CPAN will be noticed and can not be fixed except for a complete delete and re-
expand.
Sorry for the long description, but It seems a little unfair to ask for a feature without a little
effort on my part :)
Stuart R. Jefferys