develooper Front page | perl.perl5.porters | Postings from May 2017

Re: Perl 5.26.0-RC1 is now available!

Thread Previous | Thread Next
From:
Ævar Arnfjörð Bjarmason
Date:
May 16, 2017 18:41
Subject:
Re: Perl 5.26.0-RC1 is now available!
Message ID:
CACBZZX7sb9i4CaA89NZ4eMnASt8=+E9PG2+W6knQ7_efgQ1omQ@mail.gmail.com
On Sun, May 14, 2017 at 12:33 AM, Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
> On Thu, May 11, 2017 at 7:21 PM, Sawyer X <xsawyerx@gmail.com> wrote:
>> perl-5.26.0's official release will occur on May 20th, 2017, assuming
>> all goes well(tm).
>
> As someone with no contributions to this release[1] I thought I was in
> a good position to see if the perldelta made sense to someone with no
> real idea of what was going on in 5.26.
>
> I've pushed avar/v5.26.0-RC1-perldelta-fixes which has proposed fixes
> to the document:
> https://github.com/Perl/perl5/compare/blead...avar/v5.26.0-RC1-perldelta-fixes
>
> The tip of that branch are a bunch of "TODO perldelta: *" commits
> where I don't know what should be said, but think that something
> should be clarified/fixed by others who actually know what these
> entries are referring to.
>
> I think it would be uncontroversial to push the non-TODO commits to
> blead, but haven't because at this stage in the release everything
> should probably get reviewed. I'm reproducing the diff of the TODO
> commits below for convenience:
>
> diff --git a/pod/perldelta.pod b/pod/perldelta.pod
> index 06f68311fb..c8dc2b81a3 100644
> --- a/pod/perldelta.pod
> +++ b/pod/perldelta.pod
> @@ -82,6 +82,11 @@ C<%{^CAPTURE}> is the equivalent to C<%+> (ie named captures)
>
>  C<%{^CAPTURE_ALL}> is the equivalent to C<%-> (ie all named captures).
>
> +    ^ This really needs a note about what this is actually for. Is it
> +    just so you can get an array of all matched params? Why would you
> +    use a more verbose synonym like %{^CAPTURE} instead of %+ in your
> +    code?
> +
>  =head2 Unicode 9.0 is now supported
>
>  A list of changes is at L<http://www.unicode.org/versions/Unicode9.0.0/>.
> @@ -195,6 +200,12 @@ the end of the supplied buffer.
>  For security reasons, C<@INC> no longer contains the default directory
>  (C<.>).
>
> +       Why are we mentioning this both here and in the main section
> +       (maybe not an issue), but most importantly isn't this wrong?
> +       don't we have . in @INC now unless you opt-in via
> +       -Ddefault_inc_excludes_dot? If not the main section above
> +       needs changing.
> +
>  =head2 "Escaped" colons and relative paths in PATH
>
>  On Unix systems, Perl treats any relative paths in the PATH environment
> @@ -283,6 +294,9 @@ ones which weren't have been improved.
>
>  Several other ops may now also be faster in boolean context.
>
> +    Could we be a bit less vague here? Arithmetic ops? stuff like
> +    print, what?
> +
>  =item * New Faster Hash Function on 64 bit builds
>
>  We use a different hash function for short and long keys. This should
> @@ -327,6 +341,11 @@ Enhancements in Regex concat COW implementation.
>
>  Speed up C<AV> and C<HV> clearing/undeffing.
>
> +    Does this mean that `undef %h` and `undef @a` are faster, or is it
> +    for some reason only the internal XS stuff? If it's the former
> +    (which I assume) let's use the more readable forms someone not
> +    deep into XS will know about.
> +
>  =item *
>
>  Better optimise array and hash assignment
> @@ -1634,6 +1653,9 @@ tests for perlbug. [perl #128020]
>
>  C<DEFAULT_INC_EXCLUDES_DOT> has been turned on as default.
>
> +    Again, wasn't this off now by default per the intro section
> +    talking about -Ddefault_inc_excludes_dot?
> +
>  =item *
>
>  The C<dtrace> build process has further changes:
>
>
> 1. Apparently a sole commit of adding a comment to existing code
> landed me in the release notes though.

Based on feedback in this thread I've force-pushed the
avar/v5.26.0-RC1-perldelta-fixes branch just now. All the TODO items
are gone and it's ready for inclusion IMO, but I've held off on
pushing it to blead for review & because I have no idea how Sawyer et
al want to handle pushes to blead during this part of the release
cycle.

The only thing that wasn't covered which I pointed out is the "some
ops are faster now". Here's the current diff:

https://github.com/Perl/perl5/compare/blead...avar/v5.26.0-RC1-perldelta-fixes

The rest of this E-Mail is the diff between blead & my branch,
reproduced inline:

diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index ed13834024..2932386447 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -64,21 +64,25 @@ prints "Hello there\n" with no leading whitespace.

 =head2 '.' and @INC

-Perl now provides a way to build perl without C<.> in @INC by default. If you
-want this feature, you can build with -Ddefault_inc_excludes_dot
-
-Because the testing / make process for perl modules do not function well with
-C<.> missing from @INC, Perl now supports the environment variable
-PERL_USE_UNSAFE_INC=1 which makes Perl behave as it previously did, returning
-C<.> to @INC in all child processes.
-
-WARNING: C<PERL_USE_UNSAFE_INC> has been provided during the perl 5.25
-development cycle and is not guaranteed to function in perl 5.26.
-
-=head2 create a safer utf8_hop() called utf8_hop_safe()
-
-Unlike utf8_hop(), utf8_hop_safe() won't navigate before the beginning or after
-the end of the supplied buffer.
+Since time immemorial Perl has, as a last resort, loaded libraries
+from the current directory. For security reasons this is no longer the
+case, the C<@INC> variable no longer contains C<.> as its last element
+by default.
+
+If you want to disable this behavior at compile-time build perl with
+C<-Udefault_inc_excludes_dot> (C<-Ddefault_inc_excludes_dot> being the
+default now).
+
+If you'd like to add C<.> back to C<@INC> at runtime set
+C<PERL_USE_UNSAFE_INC=1> in the environment before starting
+perl. Setting it to 1 restores C<.> in the C<@INC> when perl otherwise
+lacks it.
+
+Various toolchain modules will set C<PERL_USE_UNSAFE_INC=1>
+themselves. E.g. L<Test::Harness> sets it since loading modules from a
+relative path is a common idiom in test code. If you find that you
+have C<.> in C<@INC> on a perl built with default settings it's likely
+that your code is being invoked by a toolchain module of some sort.

 =head2 @{^CAPTURE}, %{^CAPTURE}, and %{^CAPTURE_ALL}

@@ -89,6 +93,11 @@ C<%{^CAPTURE}> is the equivalent to C<%+> (ie named captures)

 C<%{^CAPTURE_ALL}> is the equivalent to C<%-> (ie all named captures).

+Unlike e.g. the C<@-> replacement for the C<$&> regex variable there's
+no performance reason to use these new synonyms. They've purely been
+added for clarity similar to the L<English>.pm synonyms for various
+variables documented in L<perlvar>.
+
 =head2 Unicode 9.0 is now supported

 A list of changes is at L<http://www.unicode.org/versions/Unicode9.0.0/>.
@@ -117,7 +126,7 @@ It is intended mainly for use in assignments to
references.  For example:
     use experimental 'refaliasing', 'declared_refs';
     my \$a = \$b;

-See L<perlref/Assigning to References> for slightly more detail.
+See L<perlref/Assigning to References> for more details.

 =head2 Perl can now do default collation in UTF-8 locales on platforms
 that support it
@@ -139,7 +148,7 @@ L<perllocale/Collation of strings containing
embedded C<NUL> characters>.

 =head2 Lexical subroutines are no longer experimental

-Using the C<lexical_subs> feature no longer emits a warning. Existing
+Using the C<lexical_subs> feature introduced in v5.18 no longer emits
a warning. Existing
 code that disables the C<experimental::lexical_subs> warning category
 that the feature previously used will continue to work. The
 C<lexical_subs> feature has no effect; all Perl code can use lexical
@@ -190,12 +199,18 @@ source code.
 The name of a character may no longer contain non-breaking spaces.  It
 has been deprecated to do so since Perl v5.22.

+=head2 create a safer utf8_hop() called utf8_hop_safe()
+
+Unlike utf8_hop(), utf8_hop_safe() won't navigate before the beginning or after
+the end of the supplied buffer.
+
 =head1 Security

 =head2 Remove current dir (C<.>) from C<@INC>

 For security reasons, C<@INC> no longer contains the default directory
-(C<.>).
+(C<.>). See L<the Core Enhancements section/"'.' and @INC"> for
+details.

 =head2 "Escaped" colons and relative paths in PATH

@@ -327,7 +342,22 @@ Enhancements in Regex concat COW implementation.

 =item *

-Speed up C<AV> and C<HV> clearing/undeffing.
+Clearing hashes and arrays has been made slightly faster. Now code
+like this is around 5% faster:
+
+    my @a;
+    for my $i (1..3_000_000) {
+        @a = (1,2,3);
+        @a = ();
+    }
+
+and this code around 3% faster:
+
+    my %h;
+    for my $i (1..3_000_000) {
+        %h = qw(a 1 b 2);
+        %h = ();
+    }

 =item *

@@ -1634,7 +1664,7 @@ tests for perlbug. [perl #128020]

 =item *

-C<DEFAULT_INC_EXCLUDES_DOT> has been turned on as default.
+C<-Ddefault_inc_excludes_dot> has been turned on as default.

 =item *

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