-
Notifications
You must be signed in to change notification settings - Fork 577
[PATCH] 5.28 perldelta Improvements #16581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
From @SmylersThis is a bug report for perl from smylers@stripey.com, From reading the 5.28 RC2 perldelta, here are a few small suggested Separate patches, in case you want to accept just some of them. Flags: Site configuration information for perl 5.28.0: Configured by smylers at Thu Jun 7 16:38:09 BST 2018. Summary of my perl5 (revision 5 version 28 subversion 0) configuration: Locally applied patches: @INC for perl 5.28.0: Environment for perl 5.28.0: |
From @Smylers0001-Clarify-key-value-slices-are-of-hashes.patchFrom 248e612b9406127c5a91bd3a83ee2a7ba8e33931 Mon Sep 17 00:00:00 2001
From: Smylers <[email protected]>
Date: Thu, 7 Jun 2018 16:05:40 +0100
Subject: [PATCH 1/5] Clarify key-value slices are of hashes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
For somebody reading the perldelta without context, make it clear that the
���key/value��� slices that are mentioned are hash slices, with a link to
their documentation.
---
pod/perldelta.pod | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 19a8f001..95a7108f 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -19,9 +19,10 @@ L<perl5260delta>, which describes differences between 5.24.0 and 5.26.0.
A list of changes is at
L<http://www.unicode.org/versions/Unicode10.0.0>.
-=head2 L<C<delete>|perlfunc/delete EXPR> on key/value slices
+=head2 L<C<delete>|perlfunc/delete EXPR> on key/value hash slices
-L<C<delete>|perlfunc/delete EXPR> can now be used on key/value slices,
+L<C<delete>|perlfunc/delete EXPR> can now be used on
+L<keyE<sol>value hash slices|perldata/KeyE<sol>Value Hash Slices>,
returning the keys along with the deleted values.
L<[perl #131328]|https://rt.perl.org/Ticket/Display.html?id=131328>
--
1.9.1
|
From @Smylers0002-Pod-fix-Escape-inside-L.patchFrom 3eb259df91497a5e3587c83c8e661f491e2993b9 Mon Sep 17 00:00:00 2001
From: Smylers <[email protected]>
Date: Thu, 7 Jun 2018 16:06:28 +0100
Subject: [PATCH 2/5] Pod fix: Escape / inside L</>
When linking to a section name that contains a literal slash, podchecker
complains.
In practice this isn't ambiguous (the first slash separates the page name
from the section name, and everything after that, including subsequent
slashes, must be the section name) and the link was working on MetaCpan.
But since podcheck complains, it seems safer to fix this.
---
pod/perldelta.pod | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 95a7108f..70aa8e26 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -1210,7 +1210,7 @@ L<[perl #131672]|https://rt.perl.org/Ticket/Display.html?id=131672>
=over 4
-=item * L<perldiag/Variable length lookbehind not implemented in regex m/%s/>
+=item * L<perldiag/Variable length lookbehind not implemented in regex mE<sol>%sE<sol>>
This now gives more ideas as to workarounds to the issue that was
introduced in Perl 5.18 (but not documented explicitly in its perldelta)
--
1.9.1
|
From @Smylers0003-Document-delete-hash-key-return-value.patchFrom 18e1cb4ab2b1292734a7abbf259ff8f48ab6b210 Mon Sep 17 00:00:00 2001
From: Smylers <[email protected]>
Date: Thu, 7 Jun 2018 16:17:33 +0100
Subject: [PATCH 3/5] Document delete %hash{key} return value
cc0776d64 introduced delete on key-value hash slices. That intuitively
returns a list of key- value pairs, which is two elements per specified
hash key. Update the docs to reflect this.
---
pod/perlfunc.pod | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index fa08d4c3..b55068f1 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -1595,10 +1595,13 @@ so that L<C<exists>|/exists EXPR> on that element no longer returns
true. Setting a hash element to the undefined value does not remove its
key, but deleting it does; see L<C<exists>|/exists EXPR>.
-In list context, returns the value or values deleted, or the last such
-element in scalar context. The return list's length always matches that of
+In list context, usually returns the value or values deleted, or the last such
+element in scalar context. The return list's length corresponds to that of
the argument list: deleting non-existent elements returns the undefined value
-in their corresponding positions.
+in their corresponding positions. When a
+L<keyE<sol>value hash slice|perldata/KeyE<sol>Value Hash Slices> is passed to
+C<delete>, the return value is a list of key/value pairs (two elements for each
+item deleted from the hash).
L<C<delete>|/delete EXPR> may also be used on arrays and array slices,
but its behavior is less straightforward. Although
--
1.9.1
|
From @Smylers0004-Clarify-that-.-is-deprecated.patchFrom bbe76c5c47597906452ae84cec3a8d4bd989e38a Mon Sep 17 00:00:00 2001
From: Smylers <[email protected]>
Date: Thu, 7 Jun 2018 16:21:11 +0100
Subject: [PATCH 4/5] Clarify that /({...)/ is deprecated
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Previously this was just a noun phrase, describing the thing that is
deprecated. Turn that into a statement, explicitly saying it is
deprecated.
Admittedly, the noun phrase is in a section headed ���Deprecations���, but
some of the items in the list are about changes to deprecations, and
everything else in the list is a full sentence, so make this be one too.
---
pod/perldelta.pod | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 70aa8e26..abe94196 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -394,7 +394,7 @@ where the C<"{"> will not be repurposed.
Note that these uses continue to raise a deprecation message.
-=head2 Use of unescaped C<"{"> immediately after a C<"("> in regular expression patterns
+=head2 Use of unescaped C<"{"> immediately after a C<"("> in regular expression patterns is deprecated
Using unescaped left braces is officially deprecated everywhere, but it
is not enforced in contexts where their use does not interfere with
--
1.9.1
|
From @Smylers0005-perldelta-headings-without-full-stops.patchFrom 437e7fbab8767602048b6dbc299f78d3ef03f3cf Mon Sep 17 00:00:00 2001
From: Smylers <[email protected]>
Date: Thu, 7 Jun 2018 16:26:12 +0100
Subject: [PATCH 5/5] perldelta headings without full stops
Most of the headings don't end with full stops (even when they are
complete sentences), so remove the full stops from the few that do, so
they all follow the same style
---
pod/perldelta.pod | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index abe94196..4e21fa59 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -276,7 +276,7 @@ allowed. This has been deprecated since Perl 5.000.
These have been no-ops and deprecated since Perl 5.12 and 5.10,
respectively.
-=head2 C<\N{}> with nothing between the braces is now illegal.
+=head2 C<\N{}> with nothing between the braces is now illegal
This has been deprecated since Perl 5.24.
@@ -294,15 +294,15 @@ Use of a bare terminator has been deprecated since Perl 5.000.
This used to work like setting it to C<undef>, but has been deprecated
since Perl 5.20.
-=head2 Unicode code points with values exceeding C<IV_MAX> are now fatal.
+=head2 Unicode code points with values exceeding C<IV_MAX> are now fatal
This was deprecated since Perl 5.24.
-=head2 The C<B::OP::terse> method has been removed.
+=head2 The C<B::OP::terse> method has been removed
Use C<B::Concise::b_terse> instead.
-=head2 Use of inherited AUTOLOAD for non-methods is no longer allowed.
+=head2 Use of inherited AUTOLOAD for non-methods is no longer allowed
This was deprecated in Perl 5.004.
@@ -374,7 +374,7 @@ accommodate datasets of more than two billion items.
=head1 Deprecations
-=head2 Use of L<C<vec>|perlfunc/vec EXPR,OFFSET,BITS> on strings with code points above 0xFF is deprecated.
+=head2 Use of L<C<vec>|perlfunc/vec EXPR,OFFSET,BITS> on strings with code points above 0xFF is deprecated
Such strings are represented internally in UTF-8, and C<vec> is a
bit-oriented operation that will likely give unexpected results on those
--
1.9.1
|
From @SmylersI submitted:
Unfortunately the character encoding of a couple got mangled somewhere along the way†. Let's try them again, uploading through the web interface ... Smylers † In my ‘sent’ folder Zoho has labelled them as application/octet-stream, base64. In the mail from RT they've become text/plain, quoted, cp1252. |
From @Smylers0001-Clarify-key-value-slices-are-of-hashes.patchFrom 248e612b9406127c5a91bd3a83ee2a7ba8e33931 Mon Sep 17 00:00:00 2001
From: Smylers <[email protected]>
Date: Thu, 7 Jun 2018 16:05:40 +0100
Subject: [PATCH 1/5] Clarify key-value slices are of hashes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
For somebody reading the perldelta without context, make it clear that the
‘key/value’ slices that are mentioned are hash slices, with a link to
their documentation.
---
pod/perldelta.pod | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 19a8f001..95a7108f 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -19,9 +19,10 @@ L<perl5260delta>, which describes differences between 5.24.0 and 5.26.0.
A list of changes is at
L<http://www.unicode.org/versions/Unicode10.0.0>.
-=head2 L<C<delete>|perlfunc/delete EXPR> on key/value slices
+=head2 L<C<delete>|perlfunc/delete EXPR> on key/value hash slices
-L<C<delete>|perlfunc/delete EXPR> can now be used on key/value slices,
+L<C<delete>|perlfunc/delete EXPR> can now be used on
+L<keyE<sol>value hash slices|perldata/KeyE<sol>Value Hash Slices>,
returning the keys along with the deleted values.
L<[perl #131328]|https://rt.perl.org/Ticket/Display.html?id=131328>
--
1.9.1
|
From @Smylers0004-Clarify-that-.-is-deprecated.patchFrom bbe76c5c47597906452ae84cec3a8d4bd989e38a Mon Sep 17 00:00:00 2001
From: Smylers <[email protected]>
Date: Thu, 7 Jun 2018 16:21:11 +0100
Subject: [PATCH 4/5] Clarify that /({...)/ is deprecated
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Previously this was just a noun phrase, describing the thing that is
deprecated. Turn that into a statement, explicitly saying it is
deprecated.
Admittedly, the noun phrase is in a section headed ‘Deprecations’, but
some of the items in the list are about changes to deprecations, and
everything else in the list is a full sentence, so make this be one too.
---
pod/perldelta.pod | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 70aa8e26..abe94196 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -394,7 +394,7 @@ where the C<"{"> will not be repurposed.
Note that these uses continue to raise a deprecation message.
-=head2 Use of unescaped C<"{"> immediately after a C<"("> in regular expression patterns
+=head2 Use of unescaped C<"{"> immediately after a C<"("> in regular expression patterns is deprecated
Using unescaped left braces is officially deprecated everywhere, but it
is not enforced in contexts where their use does not interfere with
--
1.9.1
|
From @iabynOn Fri, Jun 08, 2018 at 03:58:07AM -0700, Smylers via RT wrote:
Thanks applied as v5.28.0-RC2-4-g604776f743 .. v5.28.0-RC2-8-gd778388fc4 -- |
The RT System itself - Status changed from 'new' to 'open' |
From @iabynOn Fri, Jun 08, 2018 at 03:58:07AM -0700, Smylers via RT wrote:
Thanks applied as v5.28.0-RC2-4-g604776f743 .. v5.28.0-RC2-8-gd778388fc4 -- |
@iabyn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#133265 (status was 'resolved')
Searchable as RT133265$
The text was updated successfully, but these errors were encountered: