This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regularise "given"
authorZefram <zefram@fysh.org>
Tue, 21 Nov 2017 13:17:03 +0000 (13:17 +0000)
committerZefram <zefram@fysh.org>
Tue, 21 Nov 2017 13:23:28 +0000 (13:23 +0000)
commit76ed45178844dff782880573017d9b7c9fbc0007
tree298e28326d4df828a132e5c9680827236dc44c40
parenta252c8fe5fbed43d9b362ed97d57a5a7764fac62
regularise "given"

Change "given" from implicitly enreferencing array and hash topics to just
giving the topic scalar context.  It's difficult to say whether this is a
change of the intended behaviour or merely a bugfix, because the implicit
enreferencement was not documented, and there were no tests exercising it.
The documentation merely said that the argument is in scalar context,
which correctly describes the new behaviour.  Add a documentation note
about the old behaviour, alongside the existing notes about historical
given/when behaviour.  Incidentally fix doc that referred to assiging
to $_, to instead refer to aliasing.  Add tests for "given".
MANIFEST
op.c
pod/perlsyn.pod
t/op/given.t [new file with mode: 0644]