On Mon, Sep 29, 2008 at 5:31 AM, Barbie <[EMAIL PROTECTED]> wrote:
> If you need it a suitable regex would be:
>
>  qr/(?:\.(?:tar\.(?:gz|bz2)|tgz|zip))/;

Here's a suggested amended version, avoiding ppm and giving front and
back anchoring.  Also case insensitive, just in case someone uploads a
.ZIP file or something like that.

    qr{\.(?:tar\.(?:bz2|gz|Z)|t(?:gz|bz)|(?<!ppm\.)zip|pm.gz)$}i

It also picks up legacy .pm.gz files -- of which there are some, yes,
from ancient days of CPAN and for which CPAN.pm will generate a
Makefile, fail to find tests and report as UNKNOWN.

Any nits?  Otherwise, I'll use that in CPAN::Reporter::Smoker.

David

Reply via email to