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

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

Thread Previous | Thread Next
David Cantrell
August 17, 2021 09:50
Re: "use v5.36.0" should imply ASCII source
Message ID:
On Thu, Aug 12, 2021 at 11:08:48AM -0400, Dan Book wrote:
> On Thu, Aug 12, 2021 at 11:04 AM David Cantrell <>
> wrote:
> > On Fri, Aug 06, 2021 at 11:45:21PM -0700, Darren Duncan wrote:
> > > Question:  Is there ever a real life scenario where a single
> > > source file is not entirely the same encoding?
> > Sure. Some code, in utf8, and then a binary blob in __DATA__ which the
> > utf8 code reads and parses.
> >
> > It's not good practice, but it's what you had to do to easily distribute
> > data in a CPAN distribution before File::ShareDir::Install existed.
> Note this will currently break because the filehandle *is* shared between
> code and DATA, unlike with POD. "use utf8" applies to both. But I would
> consider the use case of non-textual data in DATA exceedingly rare.

I stopped doing it a few years ago. I think I've seen it in test suites
for some image-processing modules in the past.

David Cantrell | Godless Liberal Elitist

You can't spell AWESOME without ME!

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About