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


In reply to Re^2: Mirroring CPAN by inclusion declaration rather than by exclusion by Intrepid
in thread Mirroring CPAN by inclusion declaration rather than by exclusion by Intrepid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.