From 89edd0f09cd7d5df2d8da1aa07b7af002ca5ff74 Mon Sep 17 00:00:00 2001 From: Jacob Pipkin Date: Thu, 10 May 2012 00:14:31 -0500 Subject: code style cleanups --- sbocheck | 20 ++++++++++---------- sboconfig | 30 +++++++++++++++--------------- sbosnap | 21 ++++++++++----------- 3 files changed, 35 insertions(+), 36 deletions(-) diff --git a/sbocheck b/sbocheck index aa952dd..db84966 100755 --- a/sbocheck +++ b/sbocheck @@ -15,32 +15,32 @@ use warnings FATAL => 'all'; use strict; my %config = %SBO::Lib::config; -my $self = basename($0); +my $self = basename ($0); my %options; -getopts('v',\%options); +getopts ('v',\%options); -show_version() && exit(0) if (exists $options{v}); +show_version () && exit (0) if (exists $options{v}); -update_tree(); +update_tree (); print "Checking for updated SlackBuilds...\n"; -my @updates = get_available_updates(); +my @updates = get_available_updates (); my @listing; for (keys @updates) { my $string = "$updates[$_]{name}-$updates[$_]{installed}"; $string .= " < needs updating (SBo has $updates[$_]{update})\n"; - push(@listing,$string); + push (@listing,$string); } if (exists $listing[0]) { - my $tab = new Text::Tabulate(); - $tab->configure(tab => '\s'); - my $output = $tab->format(@listing); + my $tab = new Text::Tabulate (); + $tab->configure (tab => '\s'); + my $output = $tab->format (@listing); print "\n". $output ."\n"; } else { print "\nNo updates available.\n"; } -exit(0); +exit 0; diff --git a/sboconfig b/sboconfig index b440edb..2cb4847 100755 --- a/sboconfig +++ b/sboconfig @@ -17,7 +17,7 @@ use File::Path qw(make_path); use Fcntl; my %config = %SBO::Lib::config; -my $self = basename($0); +my $self = basename ($0); sub show_usage { print <; - close($fh); + close ($fh); tie my @temp, 'Tie::File', $filename; my $has = 'FALSE'; my $regex = qr/\A\Q$key\E=/; @@ -101,19 +101,19 @@ sub config_write { if ($has eq 'FALSE') { open (my $writer, '>>', $filename); print {$writer} "$key=$val\n"; - close($writer); + close ($writer); } - move($filename,$conf_file); + move ($filename,$conf_file); } else { open my $writer, '>', $conf_file; print {$writer} "$key=$val\n"; - close($writer); + close ($writer); } } while (my ($key,$value) = each %changes) { print "Setting $key to $value...\n"; - config_write($key,$value); + config_write ($key,$value); } -exit(0); +exit 0; diff --git a/sbosnap b/sbosnap index 62d1141..ccd7ba9 100755 --- a/sbosnap +++ b/sbosnap @@ -20,7 +20,7 @@ use strict; my %config = %SBO::Lib::config; my $sbo_home = $config{SBO_HOME}; -my $self = basename($0); +my $self = basename ($0); sub show_usage { print <