0.082810 - uninitialized value $a_key warning

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

0.082810 - uninitialized value $a_key warning

Marco Palma
I was wondering if anyone has run into the following warning thrown out by version 0.082810:

Warning was 'Use of uninitialized value $a_key in string eq at ... DBIx/Class/ResultSet.pm line 3821

I didn't any such issues with 0.08270, though I have updated other classes recently.

Looking at that line it seems like the code could be even more defensive prior to trying to use $a_key, but I'm not sure that this wouldn't just be covering up some other issue further upstream...

3817  if (ref $b eq 'HASH') {
3818    my ($b_key) = keys %{$b};
3819    if (ref $a eq 'HASH') {
3820      my ($a_key) = keys %{$a};
3821      if ($a_key eq $b_key) {
3822        return (1 + $self->_calculate_score( $a->{$a_key}, $b->{$b_key} ));
3823      } else {
3824        return 0;
3825      }

List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@...