benvanstaveren / Mojolicious-Plugin-Mongodb

Use MongoDB in Mojolicious
http://search.cpan.org/dist/Mojolicious-Plugin-Mongodb/
2 stars 2 forks source link

Uninitialized value at line 48 #1

Open Yuriy-Zhilovets opened 11 years ago

Yuriy-Zhilovets commented 11 years ago

Use of uninitialized value $_ in concatenation (.) or string at /usr/local/share/perl/5.10.1/Mojolicious/Plugin/Mongodb.pm line 48.

Reason:

The code is: for my $helpername(qw/find_and_modify mapreduce group/) { next if(defined($conf->{'no' . $_}));

Must be: next if(defined($conf->{'no_' . $helper_name}));

tmiklas commented 11 years ago

The correct line 48 is:

next if(defined($conf->{'no_' . $helpername}));