From 1c4a8fbc78986fb2de27f86ac8b06aa4d87cd8f3 Mon Sep 17 00:00:00 2001 From: J Pipkin Date: Mon, 31 Dec 2012 03:40:56 -0600 Subject: elide space between function names and any following open parentheses --- sboconfig | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sboconfig') diff --git a/sboconfig b/sboconfig index 71d9d91..92dab3f 100755 --- a/sboconfig +++ b/sboconfig @@ -19,9 +19,9 @@ use File::Copy; use File::Path qw(make_path); use File::Temp qw(tempfile);; -my $self = basename ($0); +my $self = basename($0); -sub show_usage () { +sub show_usage() { print < $tempdir); + my $tempfh = tempfile(DIR => $tempdir); my $conffh = open_read $conf_file; my $conftents = do {local $/; <$conffh>}; print {$tempfh} $conftents; @@ -132,13 +132,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; } @@ -147,7 +147,7 @@ sub config_write { while (my ($key, $value) = each %changes) { say "Setting $key to $value..."; - config_write ($key, $value) or warn "Unable to write to $conf_file\n"; + config_write($key, $value) or warn "Unable to write to $conf_file\n"; } exit 0; -- cgit v1.2.3