diff options
Diffstat (limited to 'sbofind')
-rwxr-xr-x | sbofind | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -63,7 +63,7 @@ slackbuilds_or_fetch(); # find anything with $search in its name sub perform_search { - @_ == 1 or script_error 'perform_search requires an argument.'; + script_error 'perform_search requires an argument.' unless @_ == 1; my $search_arg = shift; # first get a bunch of names from the TAGS.txt if it's available @@ -129,7 +129,7 @@ sub perform_search { # pull the contents of a file into a variable and format it for output sub get_file_contents { - @_ == 1 or script_error 'get_file_contents requires an argument'; + script_error 'get_file_contents requires an argument' unless @_ == 1; my $file = shift; -f $file or return "$file doesn't exist.\n"; my ($fh, $exit) = open_read($file); @@ -147,7 +147,7 @@ sub get_file_contents { # get build queue and return it as a single line. sub show_build_queue { - @_ == 1 or script_error('show_build_queue requires an argument.'); + script_error('show_build_queue requires an argument.') unless @_ == 1; my $queue = get_build_queue([shift], {}); return join(" ", reverse @$queue); } |