summaryrefslogtreecommitdiff
path: root/lib/Loadbars/Config.pm
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2012-04-19 23:34:11 +0200
committerPaul Buetow <paul@buetow.org>2012-04-19 23:34:11 +0200
commit07280cf0d2fd6602aa1a9d5a04b53172ad9f5a1d (patch)
treefc9e753c21cebb8edc4b338fb6c451ff9c34dd60 /lib/Loadbars/Config.pm
parent63ffb317c65863f3ba1258bd6ed9278cf4ef0d58 (diff)
some fixes
Diffstat (limited to 'lib/Loadbars/Config.pm')
-rw-r--r--lib/Loadbars/Config.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Loadbars/Config.pm b/lib/Loadbars/Config.pm
index 430c31d..e9c7218 100644
--- a/lib/Loadbars/Config.pm
+++ b/lib/Loadbars/Config.pm
@@ -41,7 +41,7 @@ our %I : shared;
sub read () {
return unless -f Loadbars::Constants->CONFFILE;
- display_info "Reading configuration from " . Loadbars::Constants->CONFFILE;
+ display_info("Reading configuration from " . Loadbars::Constants->CONFFILE);
open my $conffile, Loadbars::Constants->CONFFILE
or die "$!: " . Loadbars::Constants->CONFFILE . "\n";
@@ -54,7 +54,7 @@ sub read () {
my ( $key, $val ) = split '=';
unless ( defined $val ) {
- display_warn "Could not parse config line: $_";
+ display_warn("Could not parse config line: $_");
next;
}
@@ -62,12 +62,12 @@ sub read () {
trim($val);
if ( not exists $C{$key} ) {
- display_warn "There is no such config key: $key, ignoring";
+ display_warn("There is no such config key: $key, ignoring");
}
else {
- display_info
-"Setting $key=$val, it might be overwritten by command line params.";
+ display_info(
+"Setting $key=$val, it might be overwritten by command line params.");
$C{$key} = $val;
}
}
@@ -76,11 +76,11 @@ sub read () {
}
sub write () {
- display_warn "Overwriting config file " . Loadbars::Constants->CONFFILE
+ display_warn("Overwriting config file " . Loadbars::Constants->CONFFILE)
if -f Loadbars::Constants->CONFFILE;
open my $conffile, '>', Loadbars::Constants->CONFFILE or do {
- display_warn "$!: " . Loadbars::Constants->CONFFILE;
+ display_warn("$!: " . Loadbars::Constants->CONFFILE);
return undef;
};