From 0c9c086c92595f4848686c861863365267498aab Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Sat, 16 Apr 2016 17:39:15 +0200 Subject: Change argument checking to use postscript unless --- sboclean | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sboclean') diff --git a/sboclean b/sboclean index 851ab84..2f51f35 100755 --- a/sboclean +++ b/sboclean @@ -57,7 +57,7 @@ usage_error("You must specify at least one of -d or -w.") unless ($clean_dist || $clean_work); sub rm_full { - @_ == 1 or script_error('rm_full requires an argument.'); + script_error('rm_full requires an argument.') unless @_ == 1; my $full = shift; if ($interactive) { print "Remove $full? [n] "; @@ -69,7 +69,7 @@ sub rm_full { } sub remove_stuff { - @_ == 1 or script_error 'remove_stuff requires an argument.'; + script_error 'remove_stuff requires an argument.' unless @_ == 1; my $dir = shift; -d $dir or say 'Nothing to do.' and return 0; opendir(my $dh, $dir); -- cgit v1.2.3