From b53938127aded4ade8a7ecf21c010e71c589b80a Mon Sep 17 00:00:00 2001 From: hjp Date: Mon, 20 Nov 2006 11:26:30 +0000 Subject: [PATCH] More general defaults --- lib/Simba/CA.pm | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/lib/Simba/CA.pm b/lib/Simba/CA.pm index 5db397d..9cdcdfd 100644 --- a/lib/Simba/CA.pm +++ b/lib/Simba/CA.pm @@ -21,10 +21,9 @@ sub new { my $self = {}; bless $self, $class; - $self->{basedir} = '/home/hjp/backup'; + $self->{basedir} = '/backup'; $self->{targets} = [ - { host => 'localhost', dir => '/home/hjp/test/', }, - # { host => 'users.wsr.ac.at', dir => '/shares/user', }, + { host => 'localhost', dir => '/var/tmp', }, ]; return $self; @@ -181,5 +180,24 @@ sub mkdir_p { return undef; } } + +sub basedir { + my ($self, $dir) = @_; + $self->{basedir} = $dir if defined($dir); + return $self->{basedir}; +} + +sub targets { + my ($self, $targets) = @_; + $self->{targets} = $targets if defined($targets); + return $self->{targets}; +} + +sub add_target { + my ($self, $target) = @_; + push @{ $self->{targets} }, $target; + return $self->{targets}; +} + # vim: tw=0 expandtab 1;