Skip Menu |

This queue is for tickets about the Data-Path CPAN distribution.

Report information
The Basics
Id: 33460
Status: resolved
Priority: 0/
Queue: Data-Path

People
Owner: Jeremy [...] marzhillstudios.com
Requestors: djerius [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.1
Fixed in: (no value)



Subject: badly formed key causes uninitialized value warnings
Hi, in get() the case where the input doesn't match the regexp: my $key = $1 if ( $rkey =~ s/^\/([^\/|\[]+)//o ); (leading to $key = undef) isn't caught, leading to warnings further on when $key is being used. Here's example code: print Data::Path->new( { foo => 1 } )->get('goo'), "\n"; This results in Use of uninitialized value in substitution (s///) at /proj/axaf/ots/x86_64-linux_debian-4.0/lib/perl/5.8.8/Data/Path.pm line 70. Use of uninitialized value in hash element at /proj/axaf/ots/x86_64-linux_debian-4.0/lib/perl/5.8.8/Data/Path.pm line 77. Use of uninitialized value in exists at /proj/axaf/ots/x86_64-linux_debian-4.0/lib/perl/5.8.8/Data/Path.pm line 81. Use of uninitialized value in concatenation (.) or string at /proj/axaf/ots/x86_64-linux_debian-4.0/lib/perl/5.8.8/Data/Path.pm line 22. key does not exists at cfggen2sh line 1
fixed in version 1.3 I really should have done both bugs in one release but I wasn't paying attention.