mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
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:
parent
6ba9034d6e
commit
2540bbbc43
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user