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