Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Capture-Tiny CPAN distribution.

Report information
The Basics
Id: 78819
Status: resolved
Priority: 0/
Queue: Capture-Tiny

People
Owner: Nobody in particular
Requestors: develop [...] traveljury.com
Cc:
AdminCc:

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



Subject: Layers not functioning properly after capture
In Perl 5.16, after a capture, although PerlIO reports the correct layers on STDOUT, they aren't working correctly.
Subject: test.pl
#!/usr/local/bin/perl use v5.16; use Encode; use open qw(:encoding(utf8) :std); use Capture::Tiny qw(capture); my $foo = Encode::decode_utf8("\xC5\x82"); out('PRE'); capture {}; out('POST'); #=================================== sub out { #=================================== say "$_[0]:"; say join ', ', PerlIO::get_layers( \*STDOUT ); say $foo; say ''; } # PRE: # unix, perlio, encoding(utf8), utf8 # ł # # POST: # unix, perlio, encoding(utf8), utf8 # Wide character in say at bin/test.pl line 19. # ł #
Subject: Re: [rt.cpan.org #78819] Layers not functioning properly after capture
Date: Mon, 6 Aug 2012 19:51:59 -0400
To: bug-Capture-Tiny [...] rt.cpan.org
From: David Golden <dagolden [...] cpan.org>
On Mon, Aug 6, 2012 at 4:00 PM, Clinton Gormley via RT <bug-Capture-Tiny@rt.cpan.org> wrote: Show quoted text
> In Perl 5.16, after a capture, although PerlIO reports the correct > layers on STDOUT, they aren't working correctly.
I've confirmed it on Perl 5.14.2 as well and am checking further back. I suspect it's a perl bug, since get_layers claims layers are the same. I'll take it up with p5p. Thank you. David
Filed perlbug https://rt.perl.org/rt3/Public/Bug/Display.html?id=114404 and released 0.19 with a workaround that forces original layers back on the handles after capturing is complete.