diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-04-16 17:39:15 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-04-16 17:39:15 +0200 |
commit | 0c9c086c92595f4848686c861863365267498aab (patch) | |
tree | 83eca1090fbfe6cbecd083537365c94a9ef08799 /sboclean | |
parent | 0a035d36fb6a225640d31162e4b348dacfa93f96 (diff) | |
download | sbotools-0c9c086c92595f4848686c861863365267498aab.tar.xz |
Change argument checking to use postscript unless
Diffstat (limited to 'sboclean')
-rwxr-xr-x | sboclean | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |