develooper Front page | perl.perl5.porters | Postings from August 2021

Re: "use v5.36.0" should imply ASCII source

Thread Previous | Thread Next
From:
Dan Book
Date:
August 8, 2021 22:54
Subject:
Re: "use v5.36.0" should imply ASCII source
Message ID:
CABMkAVXuaSGac7USif1X0OL-k5S_vknvWf3stUh=H=OchtA2Ew@mail.gmail.com
On Sun, Aug 8, 2021 at 6:52 PM Ricardo Signes <perl.p5p@rjbs.manxome.org>
wrote:

> On Sat, Aug 7, 2021, at 11:55 AM, Dan Book wrote:
>
> Yes. POD parsers and the perl interpreter do not read the same parts of
> the file, ever. Thus they must each indicate to their corresponding parsers
> what encoding they contain.
>
>
> Assuming you mean this exactly as written, I don't believe this is true.
>
> use v5.34.0;
> use warnings;
>
> my $string = <<'END';
> =encoding utf8
>
> This is løvely døcumentation.
>
> =cut
> END
>
> say $string;
>
>
> Then…
>
> dinah:~$ perl demo.pl
> =encoding utf8
>
> This is løvely døcumentation.
>
> =cut
>
> dinah:~$ pod2text demo.pl
>     This is løvely døcumentation.
>
>
> It's all a muddle.
>

Yes, I worded it imprecisely. But it remains that even when abusing the
parsers to see each other's components, they still only follow their own
encoding declarations.

-Dan

Thread Previous | Thread Next


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