root/trunk/omnipitr/lib/OmniPITR/Program.pm

Revision 114, 0.6 kB (checked in by depesz, 4 years ago)

perltidy run

Line 
1 package OmniPITR::Program;
2 use strict;
3 use warnings;
4 use OmniPITR::Log;
5 use English qw( -no_match_vars );
6 use Proc::Pidfile;
7 use Carp;
8
9 sub new {
10     my $class = shift;
11     my $self = bless {}, $class;
12     $self->read_args();
13     $self->validate_args();
14     $self->{ 'pid-file' } = Proc::Pidfile->new( 'pidfile' => $self->{ 'pid-file' } ) if $self->{ 'pid-file' };
15
16     return $self;
17 }
18
19 sub run {
20     my $self = shift;
21     croak( "run() method in OmniPITR::Program was not overridden!" );
22 }
23
24 # Shortcuts
25 sub verbose { return shift->{ 'verbose' }; }
26 sub log     { return shift->{ 'log' }; }
27
28 1;
29
Note: See TracBrowser for help on using the browser.