Skip Menu |

This queue is for tickets about the podlators CPAN distribution.

Report information
The Basics
Id: 76440
Status: resolved
Priority: 0/
Queue: podlators

People
Owner: Nobody in particular
Requestors: LEONT [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.2.0
Fixed in: 2.4.1



Subject: Fix podlators to check for unicode layers correctly
This patch makes Pod::Text and Pod::Man check for unicode layers the hard way. The current method is not compatible with some of the changes we're planning to do for 5.17.0. This has to be changed to fix some long standing issues with :utf8. Leon
Subject: podlators.patch
commit a91755a7431c8070ca7c8b0de21995d611d9350d Author: Leon Timmermans <fawaka@gmail.com> Date: Mon Apr 9 10:27:53 2012 +0200 Fix podlators to check for unicode layers correctly diff --git a/lib/Pod/Man.pm b/lib/Pod/Man.pm index 96f3fcc..947fb04 100644 --- a/lib/Pod/Man.pm +++ b/lib/Pod/Man.pm @@ -753,8 +753,8 @@ sub start_document { if ($$self{utf8}) { $$self{ENCODE} = 1; eval { - my @layers = PerlIO::get_layers ($$self{output_fh}); - if (grep { $_ eq 'utf8' } @layers) { + my $flag = (PerlIO::get_layers($$self{output_fh}, output => 1, details => 1))[-1]; + if ($flag & PerlIO::F_UTF8()) { $$self{ENCODE} = 0; } } diff --git a/lib/Pod/Text.pm b/lib/Pod/Text.pm index cc02820..1b78c80 100644 --- a/lib/Pod/Text.pm +++ b/lib/Pod/Text.pm @@ -298,8 +298,8 @@ sub start_document { if ($$self{opt_utf8}) { $$self{ENCODE} = 1; eval { - my @layers = PerlIO::get_layers ($$self{output_fh}); - if (grep { $_ eq 'utf8' } @layers) { + my $flag = (PerlIO::get_layers($$self{output_fh}, output => 1, details => 1))[-1]; + if ($flag & PerlIO::F_UTF8()) { $$self{ENCODE} = 0; } };
Subject: Re: [rt.cpan.org #76440] Fix podlators to check for unicode layers correctly
Date: Sat, 26 May 2012 14:07:41 -0700
To: bug-podlators [...] rt.cpan.org
From: Russ Allbery <rra [...] stanford.edu>
"Leon Timmermans via RT" <bug-podlators@rt.cpan.org> writes: Show quoted text
> This patch makes Pod::Text and Pod::Man check for unicode layers the > hard way. The current method is not compatible with some of the changes > we're planning to do for 5.17.0. This has to be changed to fix some long > standing issues with :utf8.
Thanks, this has been applied for the next release of podlators. -- Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>