Subject: | Re: Superfluous warnings |
Date: | Mon, 23 Sep 2013 20:42:55 +0600 |
To: | bug-AnyEvent-DBI-MySQL [...] rt.cpan.org |
From: | Андрей Хозов <avkhozov [...] gmail.com> |
And, there is also such a warning -- Reference is already weak.
May be you need check reference $cache->{$_} by isweak before calling
weaken.
On Mon, Sep 23, 2013 at 8:37 PM, Andrey Khozov <avkhozov@googlemail.com>wrote:
Show quoted text
> Hi!
>
> Code:
>
>
> my $cache = $dbh->{Driver}{CachedKids};
> for (grep {$cache->{$_} == $dbh} keys %{$cache}) {
> weaken($cache->{$_});
> }
>
> generate warning ( Use of uninitialized value in numeric eq (==) ) if
> $dbh was undefined and some handles exists in $cache.
>
>
>
> --
> Andrey Khozov
>
--
Андрей Хозов