From eaa18fd91c51c136ff6ec607d46d32b87a2ea34f Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Sat, 14 Nov 2015 03:03:55 +0100 Subject: Remove prototypes and make sure subs are called with () --- sbocheck | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'sbocheck') diff --git a/sbocheck b/sbocheck index 53c3861..f5bc2b7 100755 --- a/sbocheck +++ b/sbocheck @@ -18,7 +18,7 @@ use File::Basename; my $self = basename($0); -sub show_usage() { +sub show_usage { print < \$help, 'version|v' => \$vers); -show_usage and exit 0 if $help; -show_version and exit 0 if $vers; +show_usage() and exit 0 if $help; +show_version() and exit 0 if $vers; -update_tree; +update_tree(); # retrieve and format list of available updates -sub get_update_list() { +sub get_update_list { print "Checking for updated SlackBuilds...\n"; - my $updates = get_available_updates; + my $updates = get_available_updates(); return unless exists $$updates[0]; # consistent formatting - determine longest version string, which will tell # us the max minimum length of the left side of the output for stuff that @@ -76,8 +76,8 @@ sub get_update_list() { } # print list of updates -sub print_output($) { - exists $_[0] or script_error 'print_output requires an argument'; +sub print_output { + exists $_[0] or script_error('print_output requires an argument'); my $listing = shift; if (exists $$listing[0]) { print "\n"; @@ -100,7 +100,7 @@ sub print_output($) { } } -my $output = get_update_list; -print_output $output; +my $output = get_update_list(); +print_output($output); exit 0; -- cgit v1.2.3