[Bps-public-commit] r10378 - in bpsbuilder/BPB/lib/BPB: . Backend Source
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu Jan 17 04:34:13 EST 2008
Author: sunnavy
Date: Thu Jan 17 04:34:13 2008
New Revision: 10378
Modified:
bpsbuilder/BPB/lib/BPB/Backend/SVK.pm
bpsbuilder/BPB/lib/BPB/Backend/SVN.pm
bpsbuilder/BPB/lib/BPB/Config.pm
bpsbuilder/BPB/lib/BPB/Logger.pm
bpsbuilder/BPB/lib/BPB/Script.pm
bpsbuilder/BPB/lib/BPB/Script/Build.pm
bpsbuilder/BPB/lib/BPB/Script/Export.pm
bpsbuilder/BPB/lib/BPB/Script/Import.pm
bpsbuilder/BPB/lib/BPB/Script/Initialize.pm
bpsbuilder/BPB/lib/BPB/Script/List.pm
bpsbuilder/BPB/lib/BPB/Script/Maintain.pm
bpsbuilder/BPB/lib/BPB/Source/CPAN.pm
bpsbuilder/BPB/lib/BPB/Source/Directory.pm
bpsbuilder/BPB/lib/BPB/Source/SVK.pm
bpsbuilder/BPB/lib/BPB/Source/SVN.pm
Log:
updated pod
Modified: bpsbuilder/BPB/lib/BPB/Backend/SVK.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Backend/SVK.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Backend/SVK.pm Thu Jan 17 04:34:13 2008
@@ -29,6 +29,12 @@
bless {%args}, $class;
}
+=head2 initialize
+
+initialize a project
+
+=cut
+
sub initialize {
my $self = shift;
my $dir = tempdir( CLEANUP => 1 );
@@ -68,6 +74,8 @@
=head2 import
+import a dist
+
=cut
sub import {
@@ -95,6 +103,8 @@
=head2 export
+export a project, partly or as a whole
+
=cut
sub export {
@@ -109,6 +119,9 @@
=head2 checkout
+a wrapper of check cmd of svk
+checkout a project, partly or as a whole
+
=cut
sub checkout {
@@ -120,6 +133,12 @@
BPB::Util->run( $self->_cmd( checkout => %args ) );
}
+=head2 commit
+
+a wrapper of commit cmd of svk
+
+=cut
+
sub commit {
my $self = shift;
my %args = @_;
@@ -127,6 +146,7 @@
BPB::Util->run( $self->_cmd( commit => @_ ) );
}
+# a cmd generating factory
sub _cmd {
my $self = shift;
my $type = shift;
@@ -211,6 +231,8 @@
return $cmd;
}
+# add a dist to order
+
sub _add_to_order {
my $self = shift;
my %args = @_;
@@ -228,6 +250,12 @@
}
}
+=head2 update_order
+
+regenate order
+
+=cut
+
sub update_order {
my $self = shift;
$self->log->info( "update order for " . $self->repository );
@@ -260,6 +288,12 @@
$self->order($order);
}
+=head2 order
+
+get or set order
+
+=cut
+
sub order {
my $self = shift;
my $order = shift;
@@ -283,6 +317,12 @@
}
}
+=head2 delete
+
+wrapper of delete cmd of svk
+
+=cut
+
sub delete {
my $self = shift;
my $path = shift || '';
@@ -292,6 +332,12 @@
}
}
+=head2 info
+
+wrapper of info cmd of svk
+
+=cut
+
sub info {
my $self = shift;
my $path = shift;
@@ -301,6 +347,12 @@
return $info;
}
+=head2 propset
+
+wrapper of propset cmd of svk
+
+=cut
+
sub propset {
my $self = shift;
my %args = @_;
@@ -309,6 +361,12 @@
}
+=head2 test_script
+
+set test_script for a project, aka. udpate t/test script
+
+=cut
+
sub test_script {
my $self = shift;
my %args = @_;
Modified: bpsbuilder/BPB/lib/BPB/Backend/SVN.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Backend/SVN.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Backend/SVN.pm Thu Jan 17 04:34:13 2008
@@ -29,6 +29,12 @@
bless {%args}, $class;
}
+=head2 initialize
+
+initialize a project
+
+=cut
+
sub initialize {
my $self = shift;
my $dir = tempdir( CLEANUP => 1 );
@@ -69,6 +75,8 @@
=head2 import
+import a dist
+
=cut
sub import {
@@ -101,6 +109,9 @@
=head2 export
+a wrapper of export cmd of svk
+export a project, partly or as a whole
+
=cut
sub export {
@@ -114,6 +125,9 @@
=head2 checkout
+a wrapper of check cmd of svk
+checkout a project, partly or as a whole
+
=cut
sub checkout {
@@ -125,6 +139,12 @@
BPB::Util->run( $self->_cmd( checkout => @_ ) );
}
+=head2 commit
+
+a wrapper of commit cmd of svn
+
+=cut
+
sub commit {
my $self = shift;
my %args = @_;
@@ -132,6 +152,7 @@
BPB::Util->run( $self->_cmd( commit => @_ ) );
}
+# a cmd generating factory
sub _cmd {
my $self = shift;
my $type = shift;
@@ -211,6 +232,8 @@
return $cmd;
}
+# add a dist to order
+
sub _add_to_order {
my $self = shift;
my %args = @_;
@@ -228,6 +251,12 @@
}
}
+=head2 update_order
+
+regenate order
+
+=cut
+
sub update_order {
my $self = shift;
$self->log->info( "update order for " . $self->repository );
@@ -259,6 +288,12 @@
$self->order($order);
}
+=head2 order
+
+get or set order
+
+=cut
+
sub order {
my $self = shift;
my $order = shift;
@@ -282,6 +317,12 @@
}
}
+=head2 delete
+
+wrapper of delete cmd of svn
+
+=cut
+
sub delete {
my $self = shift;
my $path = shift || '';
@@ -291,6 +332,12 @@
}
}
+=head2 info
+
+wrapper of info cmd of svn
+
+=cut
+
sub info {
my $self = shift;
my $path = shift;
@@ -303,6 +350,12 @@
return $info;
}
+=head2 propset
+
+wrapper of propset cmd of svn
+
+=cut
+
sub propset {
my $self = shift;
my %args = @_;
@@ -324,6 +377,12 @@
);
}
+=head2 test_script
+
+set test_script for a project, aka. udpate t/test script
+
+=cut
+
sub test_script {
my $self = shift;
my %args = @_;
Modified: bpsbuilder/BPB/lib/BPB/Config.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Config.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Config.pm Thu Jan 17 04:34:13 2008
@@ -25,8 +25,18 @@
}
}
-=head2 new
+=head2 Load
+to make pod-coverage.t happy.
+Load, LoadFile, Dump and DumpFile are just dropped in from YAML or YAML::Syck
+=cut
+=head2 LoadFile
+=cut
+=head2 Dump
+=cut
+=head2 DumpFile
+=cut
+=head2 new
=cut
sub new {
@@ -56,6 +66,15 @@
$self->stash( LoadFile(shift) );
}
+=head2 list
+
+list the projects.
+take name and verbose args.
+if with name, we only return the config stuff of that project.
+if with verbose, we return the whole config stuff.
+
+=cut
+
sub list {
my $self = shift;
my %args = @_;
Modified: bpsbuilder/BPB/lib/BPB/Logger.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Logger.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Logger.pm Thu Jan 17 04:34:13 2008
@@ -4,6 +4,10 @@
use Carp;
use Log::Log4perl;
+=head2 new
+
+=cut
+
sub new {
my $class = shift;
my $bpb = shift;
Modified: bpsbuilder/BPB/lib/BPB/Script.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Script.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Script.pm Thu Jan 17 04:34:13 2008
@@ -4,10 +4,16 @@
use App::CLI;
use base qw/App::CLI/;
+=head2 alias
+=cut
+
sub alias {
return ( create => 'initialize', ls => 'list');
}
+=head2 prepare
+=cut
+
sub prepare {
my $self = shift;
if ( $ARGV[0] =~ /--?h(elp)?/i ) {
Modified: bpsbuilder/BPB/lib/BPB/Script/Build.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Script/Build.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Script/Build.pm Thu Jan 17 04:34:13 2008
@@ -10,6 +10,9 @@
use BPB;
+=head2 options
+=cut
+
sub options {
(
'n|name=s' => 'name',
@@ -21,6 +24,9 @@
);
}
+=head2 run
+=cut
+
sub run {
my $self = shift;
my $install_base = shift;
Modified: bpsbuilder/BPB/lib/BPB/Script/Export.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Script/Export.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Script/Export.pm Thu Jan 17 04:34:13 2008
@@ -9,6 +9,9 @@
use BPB;
+=head2 options
+=cut
+
sub options {
(
'n|name=s' => 'name',
@@ -17,6 +20,10 @@
);
}
+=head2 run
+=cut
+
+
sub run {
my $self = shift;
my $target = shift;
Modified: bpsbuilder/BPB/lib/BPB/Script/Import.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Script/Import.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Script/Import.pm Thu Jan 17 04:34:13 2008
@@ -17,6 +17,9 @@
use File::Temp qw/tempdir/;
use Config;
+=head2 options
+=cut
+
sub options {
(
'c|config=s' => 'config',
@@ -34,6 +37,9 @@
my %imported;
+=head2 run
+=cut
+
sub run {
my $self = shift;
my $source = shift;
@@ -99,6 +105,12 @@
}
}
+=head2 import_req
+
+import required dists for a dist
+
+=cut
+
sub import_req {
my $self = shift;
my $source = shift;
@@ -157,6 +169,12 @@
}
+=head2 generate_build
+
+automatically generate build script if not provided
+
+=cut
+
sub generate_build {
my $self = shift;
my $source_dir = shift;
@@ -200,6 +218,12 @@
close $fh;
}
+=head2 parent_dir
+
+return parent dir
+
+=cut
+
sub parent_dir {
my $source = shift;
my @dirs = File::Spec->splitdir($source);
Modified: bpsbuilder/BPB/lib/BPB/Script/Initialize.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Script/Initialize.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Script/Initialize.pm Thu Jan 17 04:34:13 2008
@@ -11,6 +11,9 @@
use File::Spec;
use BPB::Config;
+=head2 options
+=cut
+
sub options {
(
'c|config=s' => 'config',
@@ -18,6 +21,9 @@
);
}
+=head2 run
+=cut
+
sub run {
my $self = shift;
my $name = shift;
Modified: bpsbuilder/BPB/lib/BPB/Script/List.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Script/List.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Script/List.pm Thu Jan 17 04:34:13 2008
@@ -11,6 +11,9 @@
use File::Spec;
use BPB::Config;
+=head2 options
+=cut
+
sub options {
(
'c|config=s' => 'config',
@@ -19,6 +22,9 @@
);
}
+=head2 run
+=cut
+
sub run {
my $self = shift;
my $name = shift;
Modified: bpsbuilder/BPB/lib/BPB/Script/Maintain.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Script/Maintain.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Script/Maintain.pm Thu Jan 17 04:34:13 2008
@@ -9,6 +9,9 @@
use BPB;
+=head2 options
+=cut
+
sub options {
(
'c|config=s' => 'config',
@@ -17,6 +20,9 @@
);
}
+=head2 run
+=cut
+
sub run {
my $self = shift;
my $source = shift;
Modified: bpsbuilder/BPB/lib/BPB/Source/CPAN.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Source/CPAN.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Source/CPAN.pm Thu Jan 17 04:34:13 2008
@@ -17,6 +17,9 @@
my $cpan_dir = tempdir( CLEANUP => 0 );
unshift @INC, $cpan_dir;
+=head2 new
+
+=cut
sub new {
my $class = shift;
Modified: bpsbuilder/BPB/lib/BPB/Source/Directory.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Source/Directory.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Source/Directory.pm Thu Jan 17 04:34:13 2008
@@ -35,6 +35,12 @@
return File::Spec->catfile( $self->directory, $self->name || $self->path );
}
+=head2 path
+
+return the basename of source
+
+=cut
+
sub path {
my $self = shift;
return basename $self->source;
Modified: bpsbuilder/BPB/lib/BPB/Source/SVK.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Source/SVK.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Source/SVK.pm Thu Jan 17 04:34:13 2008
@@ -7,6 +7,10 @@
use base qw/BPB::Source::Base/;
+=head2 new
+
+=cut
+
sub new {
my $class = shift;
my $self = $class->SUPER::new(@_);
@@ -59,6 +63,12 @@
BPB::Util->run( $_ ) for @cmds;
}
+=head2 path
+
+return path which will be used in download_directory.
+
+=cut
+
sub path {
my $self = shift;
if ( $self->source =~ m{.*/(.+)\.(tar.(gz|bz2)|tgz)$} ) {
Modified: bpsbuilder/BPB/lib/BPB/Source/SVN.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Source/SVN.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Source/SVN.pm Thu Jan 17 04:34:13 2008
@@ -7,6 +7,10 @@
use base qw/BPB::Source::Base/;
+=head2 new
+
+=cut
+
sub new {
my $class = shift;
my $self = $class->SUPER::new(@_);
@@ -58,6 +62,12 @@
BPB::Util->run( $cmd );
}
+=head2 path
+
+return path which will be used in download_directory.
+
+=cut
+
sub path {
my $self = shift;
if ( $self->source =~ m{.*/(.+)\.(tar.(gz|bz2)|tgz)$} ) {
More information about the Bps-public-commit
mailing list