in test_fn(), call test_global() if we get something back from the

method that's not a hash.  This enables "-p foo" on the command line
 for a foo that's not a hash.
This commit is contained in:
Bill Fenner
2006-10-12 17:53:45 +00:00
parent 3656c6e42a
commit cec6e00384

View File

@@ -137,6 +137,10 @@ sub test_fn {
return 0; return 0;
} }
# If accidentally called on a global, pass it along nicely.
if (defined($results) and !ref($results)) {
return test_global($dev, $method);
}
unless (defined $results and scalar keys %$results) { unless (defined $results and scalar keys %$results) {
printf "%-20s Empty Results.\n",$method; printf "%-20s Empty Results.\n",$method;
return 0; return 0;