Subject: | Reference is already weak at |
I suspect some changes to perl core (tested in v5.18.2) , attempts to re-weaken references which are already weakened result in the warning "Reference is already weak at". This can be rectified by checking the reference with isweak() first before attempting to weaken it.
Example of a patch:
7c7
< use Scalar::Util qw(weaken);
---
Show quoted text
> use Scalar::Util qw(weaken isweak);
60c60
< weaken $ret->{'Net::IPTrie::_Node::up'};
---
Show quoted text> weaken $ret->{'Net::IPTrie::_Node::up'} unless (isweak($ret->{'Net::IPTrie::_Node::up'}));
70c70
< weaken $self->{'Net::IPTrie::_Node::up'};
---
Show quoted text> weaken $self->{'Net::IPTrie::_Node::up'} unless (isweak($ret->{'Net::IPTrie::_Node::up'}));