Skip to content

[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

Closed
p5pRT opened this issue Jun 8, 2018 · 13 comments
Closed

[PATCH] 5.28 perldelta Improvements #16581

p5pRT opened this issue Jun 8, 2018 · 13 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 8, 2018

Migrated from rt.perl.org#133265 (status was 'resolved')

Searchable as RT133265$

@p5pRT
Copy link
Author

p5pRT commented Jun 8, 2018

From @Smylers

This is a bug report for perl from smylers@​stripey.com,
generated with the help of perlbug 1.41 running under perl 5.28.0.


From reading the 5.28 RC2 perldelta, here are a few small suggested
improvements to that document and those related to it.

Separate patches, in case you want to accept just some of them.



Flags​:
  category=docs
  severity=low
  Type=Patch
  PatchStatus=HasPatch


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​:
  Local Commit​: 437e7fbab8767602048b6dbc299f78d3ef03f3cf
  Ancestor​: 197e798
  Platform​:
  osname=linux
  osvers=4.4.0-124-generic
  archname=x86_64-linux
  uname='linux fozzie 4.4.0-124-generic #148~14.04.1-ubuntu smp thu may 3 07​:26​:53 utc 2018 x86_64 x86_64 x86_64 gnulinux '
  config_args='-des -Dusedevel'
  hint=recommended
  useposix=true
  d_sigaction=define
  useithreads=undef
  usemultiplicity=undef
  use64bitint=define
  use64bitall=define
  uselongdouble=undef
  usemymalloc=n
  default_inc_excludes_dot=define
  bincompat5005=undef
  Compiler​:
  cc='cc'
  ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
  optimize='-O2'
  cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion=''
  gccversion='4.8.4'
  gccosandvers=''
  intsize=4
  longsize=8
  ptrsize=8
  doublesize=8
  byteorder=12345678
  doublekind=3
  d_longlong=define
  longlongsize=8
  d_longdbl=define
  longdblsize=16
  longdblkind=3
  ivtype='long'
  ivsize=8
  nvtype='double'
  nvsize=8
  Off_t='off_t'
  lseeksize=8
  alignbytes=8
  prototype=define
  Linker and Libraries​:
  ld='cc'
  ldflags =' -fstack-protector -L/usr/local/lib'
  libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
  libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  libc=libc-2.19.so
  so=so
  useshrplib=false
  libperl=libperl.a
  gnulibc_version='2.19'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs
  dlext=so
  d_dlsymun=undef
  ccdlflags='-Wl,-E'
  cccdlflags='-fPIC'
  lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'

Locally applied patches​:
  248e612b9406127c5a91bd3a83ee2a7ba8e33931
  3eb259df91497a5e3587c83c8e661f491e2993b9
  18e1cb4ab2b1292734a7abbf259ff8f48ab6b210
  bbe76c5c47597906452ae84cec3a8d4bd989e38a
  437e7fbab8767602048b6dbc299f78d3ef03f3cf


@​INC for perl 5.28.0​:
  lib
  /usr/local/lib/perl5/site_perl/5.28.0/x86_64-linux
  /usr/local/lib/perl5/site_perl/5.28.0
  /usr/local/lib/perl5/5.28.0/x86_64-linux
  /usr/local/lib/perl5/5.28.0


Environment for perl 5.28.0​:
  HOME=/home/smylers
  LANG=en_GB.utf8
  LANGUAGE=en_GB​:en
  LC_COLLATE=C
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/home/smylers/bin​:/usr/local/sbin​:/usr/local/bin​:/sbin​:/bin​:/usr/sbin​:/usr/bin​:/usr/X11R6/bin​:/usr/games
  PERL_BADLANG (unset)
  PERL_CPANM_OPT=--sudo --prompt
  SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Jun 8, 2018

From @Smylers

0001-Clarify-key-value-slices-are-of-hashes.patch
From 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

@p5pRT
Copy link
Author

p5pRT commented Jun 8, 2018

From @Smylers

0002-Pod-fix-Escape-inside-L.patch
From 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

@p5pRT
Copy link
Author

p5pRT commented Jun 8, 2018

From @Smylers

0003-Document-delete-hash-key-return-value.patch
From 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

@p5pRT
Copy link
Author

p5pRT commented Jun 8, 2018

From @Smylers

0004-Clarify-that-.-is-deprecated.patch
From 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

@p5pRT
Copy link
Author

p5pRT commented Jun 8, 2018

From @Smylers

0005-perldelta-headings-without-full-stops.patch
From 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

@p5pRT
Copy link
Author

p5pRT commented Jun 8, 2018

From @Smylers

I submitted​:

From reading the 5.28 RC2 perldelta, here are a few small suggested
improvements to that document and those related to it.

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.

@p5pRT
Copy link
Author

p5pRT commented Jun 8, 2018

From @Smylers

0001-Clarify-key-value-slices-are-of-hashes.patch
From 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

@p5pRT
Copy link
Author

p5pRT commented Jun 8, 2018

From @Smylers

0004-Clarify-that-.-is-deprecated.patch
From 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

@p5pRT
Copy link
Author

p5pRT commented Jun 18, 2018

From @iabyn

On Fri, Jun 08, 2018 at 03​:58​:07AM -0700, Smylers via RT wrote​:

I submitted​:

From reading the 5.28 RC2 perldelta, here are a few small suggested
improvements to that document and those related to it.

Thanks applied as v5.28.0-RC2-4-g604776f743 .. v5.28.0-RC2-8-gd778388fc4

--
The optimist believes that he lives in the best of all possible worlds.
As does the pessimist.

@p5pRT
Copy link
Author

p5pRT commented Jun 18, 2018

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jun 18, 2018

From @iabyn

On Fri, Jun 08, 2018 at 03​:58​:07AM -0700, Smylers via RT wrote​:

I submitted​:

From reading the 5.28 RC2 perldelta, here are a few small suggested
improvements to that document and those related to it.

Thanks applied as v5.28.0-RC2-4-g604776f743 .. v5.28.0-RC2-8-gd778388fc4

--
The optimist believes that he lives in the best of all possible worlds.
As does the pessimist.

@p5pRT
Copy link
Author

p5pRT commented Jun 19, 2018

@iabyn - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant