зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
6ba9034d6e
Коммит
2540bbbc43
|
@ -56,14 +56,7 @@ sub AUTOLOAD {
|
||||||
foreach my $object (@$self) {
|
foreach my $object (@$self) {
|
||||||
my $method = $object->can($name);
|
my $method = $object->can($name);
|
||||||
if ($method) {
|
if ($method) {
|
||||||
my @result = &$method($object, @_);
|
push(@allResults, [&$method($object, @_)]);
|
||||||
if (@result <= 1) {
|
|
||||||
if (@result and defined($result[0])) {
|
|
||||||
push(@allResults, @result);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
push(@allResults, [@result]);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
confess("Failed to find method or property '$name' in object '$object' of MagicPipingArray '$self', aborting"); # die with stack trace
|
confess("Failed to find method or property '$name' in object '$object' of MagicPipingArray '$self', aborting"); # die with stack trace
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче