Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI-Emulate-PSGI CPAN distribution.

Report information
The Basics
Id: 97715
Status: open
Priority: 0/
Queue: CGI-Emulate-PSGI

People
Owner: Nobody in particular
Requestors: james2vegas [...] aim.com
Cc:
AdminCc:

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



Subject: local *STDOUT = $stdout doesn't localize STDOUT when running under perl debugger (perl 5.8.8)
Running under the perl debugger (perl 5.8.8), 'local *STDOUT = *$stdout;' doesn't localize STDOUT properly.  Later perl versions and using 'local *STDOUT = *$stdout' work.  Since CGI/Emulate/PSGI.pm localizes STDOUT in this way, running plackup app.psgi under the perl debugger doesn't work in 5.8.8.

Changing local *STDOUT = $stdout to local *STDOUT = *$stdout makes this work on 5.8.8 and doesn't stop it working in newer versions.

$ cat d.pl
use strict;
use warnings;

use IO::File;
print "hello\n";

{
        my $stdout = IO::File->new_tmpfile;
        local *STDOUT = $stdout;
        print "yay!\n";
}

print "bye\n";

$ perl d.pl
hello
bye
$ PERLDB_OPTS="NonStop=1" perl -d d.pl
hello
yay!
bye
$
Subject: Re: [rt.cpan.org #97715] local *STDOUT = $stdout doesn't localize STDOUT when running under perl debugger (perl 5.8.8)
Date: Sat, 2 Aug 2014 23:33:11 -0700
To: bug-CGI-Emulate-PSGI [...] rt.cpan.org
From: Tatsuhiko Miyagawa <miyagawa [...] gmail.com>
Please use Github issue tracker and possibly a pull request instead of using RT.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.