From 3638e86845bb70d443a33024df7b5c31115047c7 Mon Sep 17 00:00:00 2001 From: Dean Hamstead Date: Mon, 7 Nov 2011 15:41:42 +1100 Subject: [PATCH] Bury dead whitespace, remove useless double quotes --- src/lib/Torrus/SiteConfig.pm | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/lib/Torrus/SiteConfig.pm b/src/lib/Torrus/SiteConfig.pm index a210b2b..d489ef9 100644 --- a/src/lib/Torrus/SiteConfig.pm +++ b/src/lib/Torrus/SiteConfig.pm @@ -65,24 +65,24 @@ sub verify for my $tree ( keys %Torrus::Global::treeConfig ) { - if( $tree !~ /^[a-zA-Z][a-zA-Z0-9_\-]*$/o ) + if( $tree !~ m/^[a-zA-Z][a-zA-Z0-9_\-]*$/o ) { - Error("Invalid tree name: " . $tree); + Error('Invalid tree name: ' . $tree); $ok = 0; next; } if( not $Torrus::Global::treeConfig{$tree}{'description'} ) { - Error("Missing description for the tree named \"" . $tree . "\""); + Error('Missing description for the tree named "' . $tree . '"'); $ok = 0; } my $xmlfiles = $Torrus::Global::treeConfig{$tree}{'xmlfiles'}; if( not ref( $xmlfiles ) or not scalar( @{$xmlfiles} ) ) { - Error("'xmlfiles' array is not defined for the tree named \"" . - $tree . "\""); + Error(q|'xmlfiles' array is not defined for the tree named "| . + $tree . '"'); $ok = 0; } else @@ -90,7 +90,7 @@ sub verify for my $file ( @{$xmlfiles} ) { $ok = findXMLFile( $file, - "in the tree named \"" . $tree . "\"" ) ? + 'in the tree named "' . $tree . '"' ) ? $ok:0; } @@ -101,8 +101,8 @@ sub verify { if( not $validDaemonNames{$daemon} ) { - Error("\"" . $daemon . "\" is not a correct daemon " . - "name in the tree named \"" . $tree . "\""); + Error('"' . $daemon . '" is not a correct daemon ' . + 'name in the tree named "' . $tree . '"'); $ok = 0; } } @@ -252,16 +252,16 @@ sub findXMLFile last; } } - + if( not $found ) { - Error("Cannot find file: " . $file); + Error('Cannot find file: ' . $file); $filename = undef; } } else { - Error("File name undefined " . $msg); + Error('File name undefined ' . $msg); } return $filename; } @@ -284,14 +284,14 @@ sub mayRunCollector { my $tree = shift; my $run = $Torrus::Global::treeConfig{$tree}{'run'}{'collector'}; - return( defined($run) and $run > 0 ); + return( defined($run) and $run > 0 ); } sub collectorInstances { my $tree = shift; my $run = $Torrus::Global::treeConfig{$tree}{'run'}{'collector'}; - return( (defined($run) and $run > 1) ? int($run) : 1 ); + return( (defined($run) and $run > 1) ? int($run) : 1 ); } sub mayRunMonitor -- 2.11.4.GIT