Changed the magic piping array so that it is more consistent by removing the special casing of when there is only one return value.

This commit is contained in:
ian%hixie.ch 2001-09-09 19:04:37 +00:00
parent 6ba9034d6e
commit 2540bbbc43

View File

@ -56,14 +56,7 @@ sub AUTOLOAD {
foreach my $object (@$self) {
my $method = $object->can($name);
if ($method) {
my @result = &$method($object, @_);
if (@result <= 1) {
if (@result and defined($result[0])) {
push(@allResults, @result);
}
} else {
push(@allResults, [@result]);
}
push(@allResults, [&$method($object, @_)]);
} else {
confess("Failed to find method or property '$name' in object '$object' of MagicPipingArray '$self', aborting"); # die with stack trace
}