Skip Menu |

This queue is for tickets about the podlators CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: magnolia.k [...] me.com
Cc:
AdminCc:

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



Subject: If set 'encoding' command in the middle of pod, 'wide character' warning is output.
The perlpodspec, it is written as follows about 'encoding' command. Show quoted text
> This command, which should occur early in the document (at least before any non-US-ASCII data!)
However, when actually writing the following such pod, warning 'wide character' is output by perldoc command. ---------- =pod =head1 NAME This is the first ascii text =over 4 =encoding utf8 =item ⇒This is the first non-ascii text⇐ This is the second ascii text =cut ---------- This is because the Pod::Text that has been called from perldoc, does not take into account that you want to set the encoding in the middle of a pod. I think that it should reflect the following modifications. diff --git a/lib/Pod/Text.pm b/lib/Pod/Text.pm index 87f9e81..70007c6 100644 --- a/lib/Pod/Text.pm +++ b/lib/Pod/Text.pm @@ -277,8 +277,8 @@ sub output { my $encoding = $$self{encoding} || ''; if ($encoding) { eval { binmode ($$self{output_fh}, ":encoding($encoding)") }; + $$self{CHECKED_ENCODING} = 1; } - $$self{CHECKED_ENCODING} = 1; } if ($$self{ENCODE}) { print { $$self{output_fh} } encode ('UTF-8', $text);
Subject: Re: [rt.cpan.org #101722] If set 'encoding' command in the middle of pod, 'wide character' warning is output.
Date: Mon, 16 Feb 2015 18:27:01 -0800
To: "Magnolia K via RT" <bug-podlators [...] rt.cpan.org>
From: Russ Allbery <rra [...] cpan.org>
"Magnolia K via RT" <bug-podlators@rt.cpan.org> writes: Show quoted text
> The perlpodspec, it is written as follows about 'encoding' command.
Show quoted text
>> This command, which should occur early in the document (at least before >> any non-US-ASCII data!)
Show quoted text
> However, when actually writing the following such pod, warning 'wide > character' is output by perldoc command.
Thanks for the report! This is now fixed in Git and will be fixed in the next release. -- #!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker $^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD, 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{ rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
Thanks! On 2015-2月-16 月 21:27:11, RRA wrote: Show quoted text
> "Magnolia K via RT" <bug-podlators@rt.cpan.org> writes: >
> > The perlpodspec, it is written as follows about 'encoding' command.
>
> >> This command, which should occur early in the document (at least before > >> any non-US-ASCII data!)
>
> > However, when actually writing the following such pod, warning 'wide > > character' is output by perldoc command.
> > Thanks for the report! This is now fixed in Git and will be fixed in the > next release. >