If the result is a ref to an array, print the array.

(Have to be careful about becoming Data::Dumper...)
This commit is contained in:
Bill Fenner
2006-11-03 16:53:10 +00:00
parent 4ae815c6f9
commit 523deb988a

View File

@@ -150,7 +150,13 @@ sub test_fn {
if (grep(/^$method$/,@Dump)) {
$Dumped{$method} = 1;
foreach my $iid (keys %$results){
print " $iid : $results->{$iid}\n";
print " $iid : ";
if (ref($results->{$iid}) eq 'ARRAY') {
print "[ ", join(", ", @{$results->{$iid}}), " ]";
} else {
print $results->{$iid};
}
print "\n";
}
}
return 1;