Skip Menu |

This queue is for tickets about the Config-GitLike CPAN distribution.

Report information
The Basics
Id: 58865
Status: resolved
Priority: 0/
Queue: Config-GitLike

People
Owner: Nobody in particular
Requestors: iarnell [...] gmail.com
Cc:
AdminCc:

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



Subject: under perl 5.12, lc warns when passed undef
Under perl 5.12, lc warns when passed undef: Use of uninitialized value $section in lc at /home/iarnell/src/config-gitlike/blib/lib/Config/GitLike.pm line 718. Use of uninitialized value $name in lc at /home/iarnell/src/config-gitlike/blib/lib/Config/GitLike.pm line 718. Attached patch silences the warnings.
Subject: 0001-silence-uninitialized-warnings.patch
From 8591f1f8271c250517ab8bf66ad7fc97acf717a6 Mon Sep 17 00:00:00 2001 From: Iain Arnell <iarnell@gmail.com> Date: Sun, 27 Jun 2010 11:46:33 +0200 Subject: [PATCH] silence uninitialized warnings --- lib/Config/GitLike.pm | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/Config/GitLike.pm b/lib/Config/GitLike.pm index 25d5bec..cbc5e38 100644 --- a/lib/Config/GitLike.pm +++ b/lib/Config/GitLike.pm @@ -714,9 +714,13 @@ sub group_set { my %args = %{$args_hash}; my ($section, $subsection, $name) = _split_key($args{key}); - my $key = join( '.', - grep { defined } (lc $section, $subsection, lc $name), - ); + my $key; + { + no warnings 'uninitialized'; + $key = join( '.', + grep { defined } (lc $section, $subsection, lc $name), + ); + } $args{multiple} = $self->is_multiple($key) unless defined $args{multiple}; -- 1.7.0.1
Hello, I've applied this patch in 1.05, released to CPAN today. Thanks for your contribution! Christine