Skip Menu |

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

Report information
The Basics
Id: 75594
Status: resolved
Priority: 0/
Queue: Config-Properties

People
Owner: salva [...] cpan.org
Requestors: MITHUN [...] cpan.org
Cc:
AdminCc:

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



Subject: saveToString throws uninitialized on perl-5.8.8
The following piece of code throws an uninitialized warning when run on perl 5.8.8 (RHEL-5.6) use Config::Properties; my $p1 = Config::Properties->new(); my $p2 = Config::Properties->new(); $p1->setProperty( 'foo' => 'bar', ); $p2->setProperty( 'foo' => 'bar', ); print $p1->saveToString(); print $p2->saveToString(); The trick to get the warning is to use two different objects. I do not see an error when a single object is in scope. Use of uninitialized value in open at ~/lib/perl5/Config/Properties.pm line 371. I guess that _string_ on line 370 does need to be initialized after all. Thanks, Mithun
Just an FYI - I do not see the warnings on 5.10 and higher. My guess is that this was probably fixed in 5.8.9 https://metacpan.org/module/perl589delta#Constant-subroutines Thanks, Mithun
Fixed in 1.74 https://github.com/salva/p5-Config- Properties/commit/8a6c113ef7d11857b663b267ba0c4fc850332087 Thanks! -- Mithun