[Bps-public-commit] r18408 - in Shipwright/trunk: lib/Shipwright/Source
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Sun Feb 15 22:28:31 EST 2009
Author: sunnavy
Date: Sun Feb 15 22:28:31 2009
New Revision: 18408
Modified:
Shipwright/trunk/ (props changed)
Shipwright/trunk/lib/Shipwright/Source/Base.pm
Log:
r19885 at sunnavys-mb: sunnavy | 2009-02-16 11:27:24 +0800
permit dist names in --skip args, both cpan-Foo-Bar and Foo-Bar
Modified: Shipwright/trunk/lib/Shipwright/Source/Base.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/Base.pm (original)
+++ Shipwright/trunk/lib/Shipwright/Source/Base.pm Sun Feb 15 22:28:31 2009
@@ -476,14 +476,28 @@
sub _is_skipped {
my $self = shift;
my $module = shift;
+ my $skip;
- if ( $self->skip && defined $self->skip->{$module} ) {
- $self->log->warn("$module is skipped");
- return 1;
- }
+ if ( $self->skip ) {
+ if ( $self->skip->{$module} ) {
+ $skip = 1;
+ }
+ elsif ( grep { /-/ } keys %{ $self->skip } ) {
+ # so we have a dist skip, we need to resolve the $module to the dist name
+ my $source = Shipwright::Source->new( source => "cpan:$module" );
+ $source->_run;
+ my $name = $source->name;
+ my ($name_without_prefix) = $name =~ /^cpan-(.*)/;
+ $skip = 1
+ if $self->skip->{$name} || $self->skip->{$name_without_prefix};
+ }
+ if ($skip) {
+ $self->log->warn("$module is skipped");
+ return 1;
+ }
+ }
return;
-
}
sub _copy {
More information about the Bps-public-commit
mailing list