aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SBO-Lib/lib/SBO/Lib.pm6
-rwxr-xr-xsboconfig4
2 files changed, 5 insertions, 5 deletions
diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm
index 9583a4f..07e3975 100644
--- a/SBO-Lib/lib/SBO/Lib.pm
+++ b/SBO-Lib/lib/SBO/Lib.pm
@@ -68,7 +68,7 @@ sub script_error (;$) {
}
# sub for opening files, second arg is like '<','>', etc
-sub open_fh ($$) {
+sub open_fh {
exists $_[1] or script_error 'open_fh requires two arguments';
unless ($_[1] eq '>') {
-f $_[0] or script_error 'open_fh first argument not a file';
@@ -79,7 +79,7 @@ sub open_fh ($$) {
}
sub open_read ($) {
- return open_fh shift, '<';
+ return open_fh (shift, '<');
}
# global config variables
@@ -227,7 +227,7 @@ sub get_sbo_location {
@sbos = @$tmp;
}
state $store = {};
- # if scalar context and we've already have the location, return it now.
+ # if scalar context and we already have the location, return it now.
unless (wantarray) {
return $$store{$sbos[0]} if exists $$store{$sbos[0]};
}
diff --git a/sboconfig b/sboconfig
index 892279c..f969cbd 100755
--- a/sboconfig
+++ b/sboconfig
@@ -131,13 +131,13 @@ sub config_write ($$) {
seek $tempfh, 0, 0;
my $contents = do {local $/; <$tempfh>};
close $conffh;
- eval { $conffh = open_fh $conf_file, '>' };
+ eval { $conffh = open_fh ($conf_file, '>') };
warn "Cannot write configuration: $@\n" and return if $@;
print {$conffh} $contents or return;
close $conffh, close $tempfh;
} else {
# no config file, easiest case of all.
- my $fh = open_fh $conf_file, '>' or return;
+ my $fh = open_fh ($conf_file, '>') or return;
print {$fh} "$key=$val\n";
close $fh;
}