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

Re: Clarification about features on/off by default

Thread Previous | Thread Next
From:
Paul "LeoNerd" Evans
Date:
July 17, 2020 20:40
Subject:
Re: Clarification about features on/off by default
Message ID:
20200717214015.227092a7@shy.leonerd.org.uk
On Fri, 17 Jul 2020 14:40:10 -0400
Eric Brine <ikegami@adaelis.com> wrote:

> I was reading https://github.com/Perl/perl5/wiki/SC-Notes-2020-07-14
> 
> It talks about what features will be on and default and which ones
> won't be. What does it mean to not be enabled *by default*? Does this
> mean without C<< use v7; >>?

Indeed. The "by default" is talking about how a Perl operates from the
first line of the file.

> For example, I've been using C<< use 5.014; >> to enable the
> unicode_strings feature among others. (It fixes bugs in m//, lc() and
> the like.) It's listed as one of the features that won't be enabled
> by default. Will C<< use v7; >> enable unicode_strings or not?

You can still `use VERSION` if you wish, to switch to different
semantics. In particular, you can still

  use v5.14;

to get the current 5.14 features, or

  use v5;

to swap right back to 5.005 defaults - i.e. nothing.

You can also

  use v7;

to switch up to the *full* set of v7. We haven't yet determined yet
exactly what that will be, but aside from perhaps removing `indirect`
and possibly `switch`, it is unlikely this feature set will be any
smaller than the current 5.32.

Again to clarify - the discussion of "defaults" only applies to what
happens absent of any `use VERSION` declaration at all.

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