From cec6e0038499e400c6364aeb8c9acfcef658afdf Mon Sep 17 00:00:00 2001 From: Bill Fenner <> Date: Thu, 12 Oct 2006 17:53:45 +0000 Subject: [PATCH] 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. --- t/test_class.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/t/test_class.pl b/t/test_class.pl index e9e1cb8c..8e655ed0 100755 --- a/t/test_class.pl +++ b/t/test_class.pl @@ -137,6 +137,10 @@ sub test_fn { 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) { printf "%-20s Empty Results.\n",$method; return 0;