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:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user