|
From: <jgr...@us...> - 2003-07-12 05:59:05
|
Update of /cvsroot/popfile/engine/POPFile
In directory sc8-pr-cvs1:/tmp/cvs-serv19533/POPFile
Modified Files:
Configuration.pm
Log Message:
Test suite now has 100% coverage for Configuration meaning that all the POPFile/ modules have 100% coverage... moving on to other modules now
Index: Configuration.pm
===================================================================
RCS file: /cvsroot/popfile/engine/POPFile/Configuration.pm,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** Configuration.pm 10 Jul 2003 04:28:15 -0000 1.21
--- Configuration.pm 12 Jul 2003 05:59:02 -0000 1.22
***************
*** 114,122 ****
if ( -e $self->{pid_file__} ) {
! my $error = "\n\nAnother copy of POPFile appears to be running. \nIf this is not the case then" .
! " delete the file \n$self->{pid_file__} and restart POPFile.\n\n";
! print $error;
! $self->log_( $error );
return 0;
--- 114,120 ----
if ( -e $self->{pid_file__} ) {
! my $error = "\n\nAnother copy of POPFile appears to be running. \nIf this is not the case then delete the file \n$self->{pid_file__} and restart POPFile.\n\n";
! print STDERR $error;
return 0;
***************
*** 167,175 ****
my $i = 0;
! while ( $i < $#ARGV ) {
# A command line argument must start with a -
if ( $ARGV[$i] =~ /^-(.+)$/ ) {
my $parameter = $self->upgrade_parameter__($1);
if ( defined($self->{configuration_parameters__}{$parameter}) ) {
if ( $i < $#ARGV ) {
--- 165,174 ----
my $i = 0;
! while ( $i <= $#ARGV ) {
# A command line argument must start with a -
if ( $ARGV[$i] =~ /^-(.+)$/ ) {
my $parameter = $self->upgrade_parameter__($1);
+
if ( defined($self->{configuration_parameters__}{$parameter}) ) {
if ( $i < $#ARGV ) {
***************
*** 177,189 ****
$i += 2;
} else {
! print "Missing argument for $ARGV[$i]\n";
last;
}
} else {
! print "Unknown command line option $ARGV[$i]\n";
last;
}
} else {
! print "Expected a command line option and got $ARGV[$i]\n";
last;
}
--- 176,188 ----
$i += 2;
} else {
! print STDERR "Missing argument for $ARGV[$i]\n";
last;
}
} else {
! print STDERR "Unknown command line option $ARGV[$i]\n";
last;
}
} else {
! print STDERR "Expected a command line option and got $ARGV[$i]\n";
last;
}
***************
*** 211,215 ****
# if accessed from the config module or through module_config_ from outside
! my %upgrades = (
# Parameters that are now handled by Classifier::Bayes
--- 210,214 ----
# if accessed from the config module or through module_config_ from outside
! my %upgrades = ( # PROFILE BLOCK START
# Parameters that are now handled by Classifier::Bayes
***************
*** 262,266 ****
'update_check', 'html_update_check',
'ui_port', 'html_port',
! );
if ( defined( $upgrades{$parameter} ) ) {
--- 261,265 ----
'update_check', 'html_update_check',
'ui_port', 'html_port',
! ); # PROFILE BLOCK END
if ( defined( $upgrades{$parameter} ) ) {
|