From 29015e28a465c1135ad8087891ebffdb721ee563 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 25 Sep 2016 15:01:20 +0100 Subject: [PATCH] Cleanup argument handling --- Webperl/Utils.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Webperl/Utils.pm b/Webperl/Utils.pm index 62f0f77..394d4da 100644 --- a/Webperl/Utils.pm +++ b/Webperl/Utils.pm @@ -500,12 +500,10 @@ sub array_or_arrayref { if(scalar(@args) > 1) { return \@args; - } else(scalar(@args) == 1) { - if(ref($args[0]) eq "ARRAY") { - return $args[0]; - } else { - return [ $args[0] ]; - } + } elsif(ref($args[0]) eq "ARRAY") { + return $args[0]; + } else { + return [ $args[0] ]; } }