[Bps-public-commit] r13340 - in Shipwright/trunk: .
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Mon Jun 16 17:42:53 EDT 2008
Author: sunnavy
Date: Mon Jun 16 17:42:51 2008
New Revision: 13340
Modified:
Shipwright/trunk/ (props changed)
Shipwright/trunk/lib/Shipwright/Source.pm
Log:
r13469 at sunnavys-mb: sunnavy | 2008-06-17 05:40:08 +0800
bug fix
Modified: Shipwright/trunk/lib/Shipwright/Source.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source.pm (original)
+++ Shipwright/trunk/lib/Shipwright/Source.pm Mon Jun 16 17:42:51 2008
@@ -61,12 +61,16 @@
my $source = shift;
# prefix that can't be omitted
- return 'Compressed' if $$source =~ s/^file:.*(tar\.gz|tar\.bz2|tgz)$//i;
- return 'Directory' if $$source =~ s/^dir(ectory)?://i;
+ if ( $$source =~ /^file:.*\.(tar\.gz|tgz|tar\.bz2)$/ ) {
+ $$source =~ s/^file://i;
+ return 'Compressed';
+ }
+
+ return 'Directory' if $$source =~ s/^dir(ectory)?://i;
if ( $$source =~ s/^cpan://i ) {
- # if it's not a distribution name, like
+ # if it's not a distribution name, like
# 'S/SU/SUNNAVY/IP-QQWry-v0.0.15.tar.gz', convert '-' to '::'.
$$source =~ s/-/::/g unless $$source =~ /\.tar\.gz$/;
return 'CPAN';
More information about the Bps-public-commit
mailing list