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

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

Thread Previous | Thread Next
From:
Felipe Gasper
Date:
August 2, 2021 14:42
Subject:
Re: "use v5.36.0" should imply UTF-8 encoded source
Message ID:
7CB81336-639E-4DC0-BDDA-AB79CE70B5AD@felipegasper.com

> On Aug 2, 2021, at 10:23 AM, Paul LeoNerd Evans <leonerd@leonerd.org.uk> wrote:
> 
> On Mon, 2 Aug 2021 06:54:43 -0400
> Felipe Gasper <felipe@felipegasper.com> wrote:
> 
>> 1. -E loads the feature bundle. So if the 5.36 feature bundle is to
>> include utf8.pm, so will -E, right?
> 
> We didn't say the :5.36 feature bundle would `use utf8`.
> 
> We suggested having `use v5.36` do so.
> 
> Compare to the way that `use v5.12` onwards will `use strict`, but even
> perl5.34 -E does not:
> 
> $ perl -e 'use v5.12; $x = 123'
> Global symbol "$x" requires explicit package name (did you forget to
> declare "my $x"?) at -e line 1.
> Execution of -e aborted due to compilation errors.
> 
> $ perl5.34.0 -E '$x = 123; say $x'
> 123

Fair enough.

My point is still that this:

-----
use v5.36;
print 'Hello, world!';
-----

… should not be “subtly wrong”.

-F
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