Skip Menu |

This queue is for tickets about the Rose-DB-Object CPAN distribution.

Report information
The Basics
Id: 61963
Status: resolved
Priority: 0/
Queue: Rose-DB-Object

People
Owner: Nobody in particular
Requestors: malarky [...] uk.ibm.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.786
Fixed in: 0.790



Subject: Use of uninitialized value in anonymous hash in make_manager_methods
Hi, I am using Rose-DB-Object-0.786 as packaged for Debian in librose-db-object-perl_0.786-1_all.deb. Manager.pm doesn't appear to have changed since 0.784. $ uname -a Linux addptest 2.6.26-2-xen-amd64 #1 SMP Sun Jun 20 20:51:58 UTC 2010 x86_64 GNU/Linux $ perl -v This is perl, v5.10.0 built for x86_64-linux-gnu-thread-multi I have seen the following warning: Use of uninitialized value in anonymous hash ({}) at /usr/share/perl5/Rose/DB/Object/Manager.pm line 218. The code in question is: $args{'methods'} = { $args{'base_name'} => [ $class->default_manager_method_types ] }; Based on the preceding code, which sets $base_name to *either* $args{'base_name'} *or* $cm->auto_manager_base_name($meta->table, $object_class), and then croaks if $base_name is undef, I think that line 220 should be changed from: $args{'base_name'} => [ $class->default_manager_method_types ] to: $base_name => [ $class->default_manager_method_types ] I have made this change locally - the warning disappears and functionality seems to be unaffected. Cheers, Chris
I've made the suggested change in SVN (revision 2155). The fix will go out in the next release.