зеркало из https://github.com/mozilla/pjs.git
delete() doesn't work with array references in old versions of perl5.
This commit is contained in:
Родитель
89327ba657
Коммит
786cae104d
|
@ -94,7 +94,9 @@ sub removeObject {
|
|||
foreach my $object (@_) {
|
||||
foreach my $index (0..$#{$self->objects}) {
|
||||
if ($self->objects->[$index] == $object) {
|
||||
delete($self->objects->[$index]);
|
||||
# XXX for 5.6.1, use this: delete($self->objects->[$index]);
|
||||
# won't work in early perls though, so instead:
|
||||
$self->objects->[$index] = undef;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче