On Mon, Sep 29, 2008 at 11:41:45AM -0400, David Golden wrote: > 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.
The only one I have is .tbz, as I don't think that is supported in CPANPLUS, where the original detection came from for YACSmoke. There is also the issue that CPAN::Distnameinfo doesn't support bzip2 :( I'm also not too sure about tar.Z either. It is certainly ignored by the cpan data generation tools at the moment. Cheers, Barbie. -- Birmingham Perl Mongers <http://birmingham.pm.org> Memoirs Of A Roadie <http://barbie.missbarbell.co.uk>