[Bps-public-commit] r9774 - bpsbuilder/BPB/lib/BPB/Source
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Sat Dec 1 10:05:35 EST 2007
Author: sunnavy
Date: Sat Dec 1 10:05:27 2007
New Revision: 9774
Added:
bpsbuilder/BPB/lib/BPB/Source/Base.pm
Log:
forgot to add Base.pm
Added: bpsbuilder/BPB/lib/BPB/Source/Base.pm
==============================================================================
--- (empty file)
+++ bpsbuilder/BPB/lib/BPB/Source/Base.pm Sat Dec 1 10:05:27 2007
@@ -0,0 +1,81 @@
+package BPB::Source::Base;
+
+use warnings;
+use strict;
+use Carp;
+use File::Spec;
+
+use base qw/Class::Accessor::Fast BPB::Source/;
+__PACKAGE__->mk_accessors(qw/source directory command download_directory/);
+
+=head2 new
+
+=cut
+
+sub new {
+ my $class = shift;
+ bless {@_}, $class;
+}
+
+=head2 run
+
+=cut
+
+sub run {
+ my $self = shift;
+ my $cmd = $self->_cmd;
+ $self->_run($cmd);
+}
+
+# you should subclass this method.
+sub _cmd { }
+
+sub _run {
+ my $self = shift;
+ my $cmd = shift;
+ system($cmd);
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+BPB::Source::Base -
+
+
+=head1 SYNOPSIS
+
+
+=head1 DESCRIPTION
+
+
+=head1 INTERFACE
+
+
+=head1 DEPENDENCIES
+
+None.
+
+
+=head1 INCOMPATIBILITIES
+
+None reported.
+
+
+=head1 BUGS AND LIMITATIONS
+
+No bugs have been reported.
+
+=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