In perl.git, the branch zefram/dumb_match has been created <https://perl5.git.perl.org/perl.git/commitdiff/9e0909b2180c408354ce24b6c742f4b79e783d11?hp=0000000000000000000000000000000000000000>
at 9e0909b2180c408354ce24b6c742f4b79e783d11 (commit) - Log ----------------------------------------------------------------- commit 9e0909b2180c408354ce24b6c742f4b79e783d11 Author: Zefram <zef...@fysh.org> Date: Wed Nov 22 19:13:51 2017 +0000 perldelta for smartmatch changes commit fb24bb2d5fb05aef6336a32777331137e881eff5 Author: Zefram <zef...@fysh.org> Date: Wed Nov 22 18:47:40 2017 +0000 test $swap arg for smartmatch overload commit 1068631d8485410b2f8645d5413bbed47244a4a8 Author: Zefram <zef...@fysh.org> Date: Wed Nov 22 18:24:43 2017 +0000 update doc in lib/ about smartmatch commit 25233fb4d503834fd10cefc6b551240224a7f31a Author: Zefram <zef...@fysh.org> Date: Wed Nov 22 18:08:06 2017 +0000 canonicalise smartmatch overload truth values This enforces that a smartmatch overload returns just a truth value indicating whether the lhs matches the criterion, not some more complex kind of result that doesn't fit the smartmatch concept. commit ab179ac766f9eda4c7f539d09c43b02b45938b5c Author: Zefram <zef...@fysh.org> Date: Wed Nov 22 17:57:26 2017 +0000 drop op flag for implicit smartmatch OPf_SPECIAL on a smartmatch op used to indicate that it was an implicit smartmatch in a "when" construct. "when" no longer implies smartmatch, so drop the comment about this flag and the special handling in B::Deparse. commit 8a0ed425bf56098485707c69bba62ee2404bef3f Author: Zefram <zef...@fysh.org> Date: Wed Nov 22 17:51:21 2017 +0000 test details of smartmatch overloading Test that an exception in a smartmatch overload is propagated out of the smartmatch operation. Test that a smartmatch overload is called in scalar context for a scalar or list context smartmatch, and in void context for a void context smartmatch. commit e32748c9f33b07135a5e2e4f1cdcdf22cd3a93ad Author: Zefram <zef...@fysh.org> Date: Wed Nov 22 17:38:42 2017 +0000 remove now-unused "M" debugging flag commit 5f3202fa3e77c4a20de590df045af4683aaedffa Author: Zefram <zef...@fysh.org> Date: Wed Nov 22 17:23:57 2017 +0000 eviscerate smartmatch Regularise smartmatch's operand handling, by removing the implicit enreferencement and just supplying scalar context. Eviscerate its runtime behaviour, by removing all the matching rules other than rhs overloading. Overload smartmatching in the Regexp package to perform regexp matching. There are consequential customisations to autodie, in two areas. Firstly, autodie::exception objects are matchers, but autodie has been advising smartmatching with the exception on the lhs. This has to change to the rhs, in both documentation and tests. Secondly, it uses smartmatching as part of its hint mechanism. Most of the hint examples, in documentation and tests, have to change to subroutines, to be portable across Perl versions. commit 5e1cca32ac612f0b59508a99fbff671a693f39b9 Author: Zefram <zef...@fysh.org> Date: Wed Nov 22 17:16:36 2017 +0000 update perlexperiment.pod re smartmatch Mention the big changes in 5.28, and explicate that the experiment covers switch as well as smartmatch. commit 98729e54e4bb1f6f9e5e0a21c6e56461abe54dbf Author: Zefram <zef...@fysh.org> Date: Tue Nov 21 20:13:03 2017 +0000 revise all given/when documentation Update documentation that describes old behaviour of given/when (of various vintages) as current. Remove duplication. Edit the main section in perlsyn for clarity. Properly document details of "break". commit 64805db9f7c4784f6ddf4f97dcbe6fd820f05a45 Author: Zefram <zef...@fysh.org> Date: Tue Nov 21 18:47:09 2017 +0000 merge switch sections in perlsyn.pod Now that the biggest parts of the "Experimental Details on given and when" are gone, merge the remaining part of the section into the "Switch Statements" section. commit 1c71ec5e58384a564f5eb9864d03334aa772afcc Author: Zefram <zef...@fysh.org> Date: Tue Nov 21 18:28:31 2017 +0000 remove unused arg from newGIVWHENOP() The entertarg argument hasn't been used for a long time. commit b69ef0135bfebf0c32023bcb970dbb95957b32e7 Author: Zefram <zef...@fysh.org> Date: Tue Nov 21 18:17:10 2017 +0000 regularise "when" Remove from "when" the implicit enreferencement of array/hash conditions and the implicit smartmatch of most conditions. Delete most of the documentation about behaviour of older versions of given/when, because explaining the now-old "when" behaviour would be excessively cumbersome and there's little compatibility to take advantage of. Delete the documentation about differences of given/when from the Perl 6 feature, because the differences are now even more extensive and it's too much difference to sensibly explain. Add tests of "when" in isolation. commit 76ed45178844dff782880573017d9b7c9fbc0007 Author: Zefram <zef...@fysh.org> Date: Tue Nov 21 13:17:03 2017 +0000 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". ----------------------------------------------------------------------- -- Perl5 Master Repository