[Bps-public-commit] r10376 - bpsbuilder/BPB/lib/BPB
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu Jan 17 04:28:59 EST 2008
Author: sunnavy
Date: Thu Jan 17 04:28:59 2008
New Revision: 10376
Modified:
bpsbuilder/BPB/lib/BPB/Build.pm
Log:
bug fix
Modified: bpsbuilder/BPB/lib/BPB/Build.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Build.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Build.pm Thu Jan 17 04:28:59 2008
@@ -18,6 +18,10 @@
use File::Find qw/find/;
use File::Slurp;
+=head2 new
+
+=cut
+
sub new {
my $class = shift;
my $self = {@_};
@@ -40,6 +44,12 @@
return $self;
}
+=head2 run
+
+the mainly method, it do the actual work.
+
+=cut
+
sub run {
my $self = shift;
my %args = @_;
@@ -83,13 +93,15 @@
}
+# install one dist, the install methods are in scripts/distname/build
+
sub _install {
my $self = shift;
my $dir = shift;
- my @cmds = File::Spec->catfile( 'scripts', $dir, 'build' );
+ my @cmds = read_file(File::Spec->catfile( 'scripts', $dir, 'build' ));
chomp @cmds;
- @cmds = map { $self->substitute($_) } @cmds;
+ @cmds = map { $self->_substitute($_) } @cmds;
chdir File::Spec->catfile( 'dists', $dir );
@@ -129,6 +141,8 @@
}
}
+
+# wrap the bin files, mainly for ENV
sub _wrapper {
my $self = shift;
@@ -156,6 +170,8 @@
find( $sub, @dirs ) if @dirs;
}
+# substitute template string, now only support %%PERL%% and %%INSTALL_BASE%%
+
sub _substitute {
my $self = shift;
my $text = shift;
@@ -169,6 +185,11 @@
return $text;
}
+=head2 test
+
+run the commands in t/test
+
+=cut
sub test {
my $self = shift;
More information about the Bps-public-commit
mailing list