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

Re: "use v5.36.0" should imply UTF-8 encoded source

Thread Previous | Thread Next
From:
Paul "LeoNerd" Evans
Date:
July 31, 2021 09:24
Subject:
Re: "use v5.36.0" should imply UTF-8 encoded source
Message ID:
20210731102354.602582da@shy.leonerd.org.uk
On Fri, 30 Jul 2021 18:34:23 -0700
Darren Duncan <darren@darrenduncan.net> wrote:

> In theory this could be a problem if the source file isn't actually
> UTF-8 encoded and someone adding that new boilerplate didn't realize
> this particular effect.

I think there's a wider point to be made here.

Up until recently, `use VERSION` didn't really have much interesting
effect besides declaring what version of perl was required, so perhaps
authors have got used to being able to fairly trivially change the
number they put there.

Currently, it activates numbered feature bundles and turns on `use
strict`; we're about to have it turn on `warnings`, discussing `utf8`,
and I can see a future in which we gain more `strict` flags that one
day get turned on too. All of this suggests that people should be more
careful when updating the `use VERSION` declaration of existing code.

That's not to say that we, perl core, need to do anything about that,
beyond making some better messaging. We need to convey the point that
when writing new code, feel free to pick a nicely late version that has
whatever features you need, but be more careful when updating older
code to bump that version number upwards as it may have unintended
effects.

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk      |  https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/  |  https://www.tindie.com/stores/leonerd/

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