mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-02 12:07:52 +00:00
delete() doesn't work with array references in old versions of perl5.
This commit is contained in:
parent
556eefde1c
commit
fa701c948c
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user