[Bps-public-commit] r9764 - bpsbuilder/BPB/lib/BPB/Script
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu Nov 29 10:24:17 EST 2007
Author: sunnavy
Date: Thu Nov 29 10:24:17 2007
New Revision: 9764
Added:
bpsbuilder/BPB/lib/BPB/Script/Source.pm
Log:
added source cli
Added: bpsbuilder/BPB/lib/BPB/Script/Source.pm
==============================================================================
--- (empty file)
+++ bpsbuilder/BPB/lib/BPB/Script/Source.pm Thu Nov 29 10:24:17 2007
@@ -0,0 +1,50 @@
+package BPB::Script::Source;
+
+use strict;
+use warnings;
+use Carp;
+
+use base qw/App::CLI::Command Class::Accessor::Fast/;
+__PACKAGE__->mk_accessors(qw/config type source directory moniker/);
+
+use BPB;
+
+sub options {
+ ( 'c|config=s' => 'config',
+ 'k|moniker=s' => 'moniker',
+ 't|type=s' => 'type',
+ 's|source=s' => 'source',
+ 'd|directory=s' => 'directory',
+ )
+}
+
+
+sub run {
+ my $self = shift;
+ my %args;
+ my %options = options();
+ for ( values %options ) {
+ $args{$_} = $self->$_ if $self->$_;
+ }
+ $args{source} ||= shift;
+ my $bpb = BPB->new( %args );
+ $bpb->source->run;
+}
+
+
+1;
+
+__END__
+
+=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