develooper Front page | perl.perl5.porters | Postings from July 2012

[perl #63498] First call of Devel::Peek::Dump after STDERR is redirected to a string generates a "Use of uninitialized value in subroutine" warning.

Thread Previous
From:
Father Chrysostomos via RT
Date:
July 31, 2012 00:10
Subject:
[perl #63498] First call of Devel::Peek::Dump after STDERR is redirected to a string generates a "Use of uninitialized value in subroutine" warning.
Message ID:
rt-3.6.HEAD-11172-1343718632-907.63498-14-0@perl.org
On Tue Jul 31 00:06:34 2012, sprout wrote:
> This was fixed in 5.14.0:
> 
> $ cat foo
> #!/usr/bin/perl
> use warnings;
> use Devel::Peek;
> my $sOut;
> close(STDERR);
> open(STDERR, ">", \$sOut) or die "Can't redirect STDERR to \\\$sOut";
> my $x; Dump $x;

I cut off the last line by mistake:

print $sOut;

> 
> $ perl5.14.0 foo
> SV = NULL(0x0) at 0x826430
>   REFCNT = 1
>   FLAGS = (PADMY)
> 
> $ perl5.12.0 foo
> Use of uninitialized value in subroutine entry at foo line 7.
> SV = NULL(0x0) at 0x822610
>   REFCNT = 1
>   FLAGS = (PADMY)
> 


-- 

Father Chrysostomos


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About