http://www.perlmonks.org?node_id=1216499

ewedaa has asked for the wisdom of the Perl Monks concerning the following question:

I need to filter three modules when using minicpan, but the module_filters isn't working as expected.

These are the three modules (They refused to download through my firewall because they trigger the virus filter.)

# authors/id/C/CO/CONVERTER/Mail-ClamAV-0.24.tar.gz # authors/id/J/JW/JWIED/Mail-IspMailGate-1.1011.tar.gz # authors/id/R/RJ/RJBS/Mail-DeliveryStatus-BounceParser-1.542.tar.gz

The first module I list in module_filters works (as long as it doesn't have a dash in the name) but the next two never work.

#Path Filters mainly rule out modules, NOT contributors module_filters => [ qr/ClamAV/i, # sub { $_[0] =~ /Mail-DeliveryStatus-BounceParser/i }, #This does not + work sub { $_[0] =~ /BounceParser/i }, #This does not work either ],

What silly thin am I missing? I looked at the actual Mini.pm file and both path_filters and modules_filters seem to be using the same chunk of search code.

I'm annoyed!

Replies are listed 'Best First'.
Re: minicpan module_filters not working as expected
by taint (Chaplain) on Jun 12, 2018 at 20:27 UTC
    Don't know if it might be your shell, or OS. But maybe a quoting problem. eg; escaping the dash(es), or quoting the module names.
    That's what it looks like to me, anyway.

    ¡λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH

Re: minicpan module_filters not working as expected
by soonix (Canon) on Jun 13, 2018 at 09:09 UTC

      But when I do just Mail-Delivery it fails also...

        I'm not sure whether I located the right spot in the source, but
        return 1 if $self->__do_filter($self->{path_filters}, $args->{path +}); return 1 if $self->__do_filter($self->{module_filters}, $args->{modu +le});
        seems to suggest you should try with qr/Mail::Delivery/i (double colon instead of dash).
Re: minicpan module_filters not working as expected
by Anonymous Monk on Jun 14, 2018 at 14:45 UTC

    Maybe you want to use path_filters rather than module_filters? Here is the relevant part of my .minicpanrc, and it is known to work.

    path_filters: /Mail-DeliveryStatus-BounceParser-\d

    This is under macOS (as they spell it now) and the current Perl. I have been using MiniCPAN for several years, and I tend to stay current on Perl, so I conclude that it works with pretty much any Perl since about 5.20.

Re: minicpan module_filters not working as expected
by ewedaa (Initiate) on Jun 19, 2018 at 20:32 UTC
    Well, none of your fine suggestions worked for me, sadly, I must be misunderstanding something. What DID work was switching from an http://hostname to an https://hostname which meant that my firewall didn't understand that I was downloading packages with virus signatures in them. Blah!