[Bps-public-commit] Shipwright branch, master, updated. 021be4a3bfe95c783b40834aeffd250e91dcb907
? sunnavy
sunnavy at bestpractical.com
Thu May 10 14:44:05 EDT 2012
The branch, master has been updated
via 021be4a3bfe95c783b40834aeffd250e91dcb907 (commit)
from 514c9974dd6709310d7b9241e63a5c6747c37c9f (commit)
Summary of changes:
lib/Shipwright/Source.pm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 021be4a3bfe95c783b40834aeffd250e91dcb907
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri May 11 02:39:49 2012 +0800
take care of sources like CPAN::Meta and Directory::Queue
diff --git a/lib/Shipwright/Source.pm b/lib/Shipwright/Source.pm
index 397c38a..929cda6 100644
--- a/lib/Shipwright/Source.pm
+++ b/lib/Shipwright/Source.pm
@@ -85,19 +85,19 @@ sub type {
}
}
- return 'Directory' if $$source =~ s/^dir(?:ectory)?://i;
+ return 'Directory' if $$source =~ s/^dir(?:ectory)?:(?!:\w+)//i;
return 'Shipyard' if $$source =~ s/^(?:shipyard|shipwright)://i;
# prefix that can be omitted
for my $type (qw/svn http ftp git/) {
- if ( $$source =~ /^$type:/i ) {
+ if ( $$source =~ /^$type:(?!:\w+)/i ) {
$$source =~ s{^$type:(?!//)}{}i;
return $type eq 'git' ? 'Git' : uc $type;
}
}
- if ( $$source =~ m{^(//|svk:)}i ) {
+ if ( $$source =~ m{^(//|svk:(?!:\w+))}i ) {
$$source =~ s/^svk://i;
return 'SVK';
}
@@ -105,7 +105,7 @@ sub type {
return 'Directory' if -d $$source;
# default is cpan module or distribution
- $$source =~ s!^cpan:!!i;
+ $$source =~ s/^cpan:(?!:\w+)//i;
return if $$source =~ /:/ && $$source !~ /::/;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list