> Minicpan provides for exclusion of modules matching a regex
Please show us the syntax, it's possible to write a regex matching everything except ExtUtils::
(Hint: negative look-ahead)
Edit
If you were referring to path_filters , please read the doc again, regex is only one of the possibilities, you can also provide a sub as filter. Should be straightforward...
Furthermore does this SO discussion:
List Pinto as alternative for cpanmini
| [reply] [d/l] [select] |
Rolf wrote:
If you were referring to path_filters , please read the doc again, regex is only one of the possibilities, you can also provide a sub as filter. Should be straightforward...
You got me, I indeed only skimmed the docs and then forgot about the option to use a sub. That's embarrassing but helpful.
Edit
My code is now doing what I want and in case someone is interested, here it is: (my code was NOT doing what I wanted; it was repeating packages for reasons I do not yet grasp. This code now fixes that.)
EDIT second EDIT - messed up posting code by preprocessing it with Text::Textile. Obviously, this was unnecessary with Perlmonk's special processing of code blocks.
#!/usr/bin/env perl
# Last modified: Thu Nov 14 2024 06:16:33 PM -05:00 [EST]
use strict;
use v5.18;
use utf8;
use warnings;
use CPAN::Mini;
my %seen;
CPAN::Mini->update_mirror(
remote => "http://www.cpan.org",
local => "/cygdrive/c/Users/somia/AppData/Roaming/minicpan",
skip_perl => 1,
log_level => 'info',
dirmode => 0761,
path_filters =>[
sub {
exists $seen{$_[0]} and return 1;
$seen{$_[0]} = 1;
$_[0] =~ qr%/(ExtUtils-.+)% and do { print STDERR '-'x 76 , qq[\
+n],
$1 , qq[\n]; return 0; }
or return 1;
}
],
);
Nov 30, 2024 at 19:51 UTC
The open palm of desire
Wants everything, it wants everything
It wants soil as soft as summer
And the strength to push like spring
Paul Simon -> Further to Fly
| [reply] [d/l] |
There's a list of all CPAN modules on Metacpan.org.
I would get that and parse out (using HTML::Parser::Simple maybe?) the module names I was after and tuck them somewhere nice:
cpan -g ExtUtils::CBuilder
This gets the module and puts it in the current directory.
Celebrate Intellectual Diversity
| [reply] [d/l] |
That's a good suggestion, thanks. The one detail that makes a difference lies in whether you know all the modules you are interested in, in advance. Using my way creates a nice minimini-cpan of all ExtUtils:: even ones I did not know existed. I can now use perldoc and peruse them at my leisure.
Nov 12, 2024 at 04:21 UTC
| [reply] |
Is there a reason not to use the MetaCPAN website for this?
| [reply] |