[Bps-public-commit] r10158 - bpsbuilder/BPB/lib/BPB/Script
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu Dec 27 12:19:36 EST 2007
Author: sunnavy
Date: Thu Dec 27 12:19:36 2007
New Revision: 10158
Added:
bpsbuilder/BPB/lib/BPB/Script/List.pm
Log:
added list cli
Added: bpsbuilder/BPB/lib/BPB/Script/List.pm
==============================================================================
--- (empty file)
+++ bpsbuilder/BPB/lib/BPB/Script/List.pm Thu Dec 27 12:19:36 2007
@@ -0,0 +1,58 @@
+package BPB::Script::List;
+
+use strict;
+use warnings;
+use Carp;
+
+use base qw/App::CLI::Command Class::Accessor::Fast/;
+__PACKAGE__->mk_accessors(qw/config name verbose/);
+
+use BPB;
+use File::Spec;
+use BPB::Config;
+
+sub options {
+ (
+ 'c|config=s' => 'config',
+ 'n|name=s' => 'name',
+ 'v|verbose' => 'verbose',
+ );
+}
+
+sub run {
+ my $self = shift;
+ my $name = shift;
+ $self->name( $name ) if $name;
+ my $bpb = BPB->new( config => $self->config, name => $self->name );
+ $bpb->config->list( name => $self->name, verbose => $self->verbose );
+}
+
+
+1;
+
+__END__
+
+=head1 NAME
+
+BPB::Script::List - list one or all the projects
+
+=head1 SYNOPSIS
+
+ bpb list create a project
+
+ Options:
+ --config(-c) specify which config.yml we'll use
+ --name(-n) specify the project's name
+ --verbose(-v) show more info
+
+=head1 AUTHOR
+
+sunnavy C<< <sunnavy at bestpractical.com> >>
+
+=head1 LICENCE AND COPYRIGHT
+
+Copyright 2007 Best Practical Solutions.
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
More information about the Bps-public-commit
mailing list