[Bps-public-commit] r9942 - in bpsbuilder/BPB/lib: . BPB BPB/Source
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Fri Dec 14 06:21:43 EST 2007
Author: sunnavy
Date: Fri Dec 14 06:21:42 2007
New Revision: 9942
Modified:
bpsbuilder/BPB/lib/BPB.pm
bpsbuilder/BPB/lib/BPB/Script/Import.pm
bpsbuilder/BPB/lib/BPB/Source.pm
bpsbuilder/BPB/lib/BPB/Source/Base.pm
bpsbuilder/BPB/lib/BPB/Source/Compressed.pm
bpsbuilder/BPB/lib/BPB/Source/Directory.pm
Log:
we can import other non cpan alike dists now
Modified: bpsbuilder/BPB/lib/BPB.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB.pm (original)
+++ bpsbuilder/BPB/lib/BPB.pm Fri Dec 14 06:21:42 2007
@@ -47,7 +47,8 @@
$self->source(
BPB::Source->new(
%{ $self->config->name->{source} },
- source => $args{source}
+ with_cpan => $args{with_cpan},
+ source => $args{source},
)
) if $args{source};
Modified: bpsbuilder/BPB/lib/BPB/Script/Import.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Script/Import.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Script/Import.pm Fri Dec 14 06:21:42 2007
@@ -5,7 +5,7 @@
use Carp;
use base qw/App::CLI::Command Class::Accessor::Fast/;
-__PACKAGE__->mk_accessors(qw/config name comment source/);
+__PACKAGE__->mk_accessors(qw/config name comment source no_cpan/);
use BPB;
use File::Spec;
@@ -17,6 +17,7 @@
'n|name=s' => 'name',
'm|comment=s' => 'comment',
's|source=s' => 'source',
+ 'no-cpan' => 'no_cpan',
);
}
@@ -30,7 +31,8 @@
my $bpb = BPB->new(
config => $self->config,
name => $self->name,
- source => $self->source
+ source => $self->source,
+ with_cpan => ! $self->no_cpan,
);
$self->source($bpb->source->run);
Modified: bpsbuilder/BPB/lib/BPB/Source.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Source.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Source.pm Fri Dec 14 06:21:42 2007
@@ -12,6 +12,7 @@
our %DEFAULT = (
follow => 1,
mini_perl_version => 5.008.008,
+ with_cpan => 1,
);
$DEFAULT{directory} = tempdir( CLEANUP => 1 );
Modified: bpsbuilder/BPB/lib/BPB/Source/Base.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Source/Base.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Source/Base.pm Fri Dec 14 06:21:42 2007
@@ -10,7 +10,8 @@
use base qw/Class::Accessor::Fast/;
__PACKAGE__->mk_accessors(
- qw/source directory download_directory follow min_perl_version map_path/);
+ qw/source directory download_directory follow min_perl_version map_path
+ with_cpan/);
=head2 new
Modified: bpsbuilder/BPB/lib/BPB/Source/Compressed.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Source/Compressed.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Source/Compressed.pm Fri Dec 14 06:21:42 2007
@@ -15,7 +15,7 @@
my $self = shift;
my $ret = $self->SUPER::run();
$self->_copy( @_ );
- $self->_follow($self->path) if $self->follow;
+ $self->_follow($self->path) if $self->follow && $self->with_cpan;
return $self->path;
}
Modified: bpsbuilder/BPB/lib/BPB/Source/Directory.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Source/Directory.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Source/Directory.pm Fri Dec 14 06:21:42 2007
@@ -25,7 +25,7 @@
sub run {
my $self = shift;
$self->SUPER::run();
- $self->_follow($self->path) if $self->follow;
+ $self->_follow($self->path) if $self->follow && $self->with_cpan;
return $self->path;
}
More information about the Bps-public-commit
mailing list