aboutsummaryrefslogtreecommitdiff
path: root/sboremove
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-11-14 03:03:55 +0100
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-11-14 03:03:55 +0100
commiteaa18fd91c51c136ff6ec607d46d32b87a2ea34f (patch)
treeb5d5cf8fe7b7adf75694f205ab9ca7dfded501d3 /sboremove
parent38623091f241bd53975cf685136bab57f78c255e (diff)
downloadsbotools-eaa18fd91c51c136ff6ec607d46d32b87a2ea34f.tar.xz
Remove prototypes and make sure subs are called with ()
Diffstat (limited to 'sboremove')
-rwxr-xr-xsboremove18
1 files changed, 9 insertions, 9 deletions
diff --git a/sboremove b/sboremove
index 4017d2b..b66325f 100755
--- a/sboremove
+++ b/sboremove
@@ -18,7 +18,7 @@ use File::Basename;
my $self = basename ($0);
-sub show_usage() {
+sub show_usage {
print <<EOF
Usage: $self [options] sbo
@@ -44,9 +44,9 @@ GetOptions(
'alwaysask|a' => \$alwaysask,
);
-show_usage and exit 0 if $help;
-show_version and exit 0 if $vers;
-show_usage and exit 1 unless exists $ARGV[0];
+show_usage() and exit 0 if $help;
+show_version() and exit 0 if $vers;
+show_usage() and exit 1 unless exists $ARGV[0];
# ensure that all provided arguments are valid sbos
my @sbos;
@@ -78,7 +78,7 @@ my (%required_by, @confirmed);
sub get_reverse_reqs($) {
my $installed = shift;
FIRST: for my $inst (@$installed) {
- my $require = get_requires $inst;
+ my $require = get_requires($inst);
next FIRST unless $$require[0];
SECOND: for my $req (@$require) {
unless ( $req eq '%README%' ) {
@@ -92,11 +92,11 @@ sub get_reverse_reqs($) {
}
}
}
-get_reverse_reqs $inst_names;
+get_reverse_reqs($inst_names);
# returns a list of installed sbo's that list the given sbo as a requirement,
# excluding any installed sbo's that have already been confirmed for removal
-sub get_required_by($) {
+sub get_required_by {
my $sbo = shift;
my @dep_of;
if ( $required_by{$sbo} ) {
@@ -111,7 +111,7 @@ sub get_required_by($) {
return exists $dep_of[0] ? \@dep_of : undef;
}
-sub confirm_remove($) {
+sub confirm_remove {
my $sbo = shift;
my $found = 0;
for my $conf (@confirmed) {
@@ -131,7 +131,7 @@ if ($inst_names) {
# Confirm all and skip prompts if noninteractive
if ($non_int) {
- confirm_remove $_ for @$remove_queue;
+ confirm_remove($_) for @$remove_queue;
goto CONFIRMED;
}