diff options
author | Zefram <zefram@fysh.org> | 2017-11-22 17:23:57 +0000 |
---|---|---|
committer | Zefram <zefram@fysh.org> | 2017-11-22 17:23:57 +0000 |
commit | 5f3202fa3e77c4a20de590df045af4683aaedffa (patch) | |
tree | 5572a671df6c4586c7d77cf8f98787eb0f457f07 /regen | |
parent | 5e1cca32ac612f0b59508a99fbff671a693f39b9 (diff) | |
download | perl-5f3202fa3e77c4a20de590df045af4683aaedffa.tar.gz |
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.
Diffstat (limited to 'regen')
-rw-r--r-- | regen/opcodes | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/regen/opcodes b/regen/opcodes index 5aa8a94fa5..18dc4fcbfa 100644 --- a/regen/opcodes +++ b/regen/opcodes @@ -179,7 +179,7 @@ ncomplement numeric 1's complement (~) ck_bitop fsT1 S # warning is gone, this can change to ck_null. scomplement string 1's complement (~) ck_bitop fsT1 S -smartmatch smart match ck_smartmatch s2 +smartmatch smart match ck_null ifs2 S S # High falutin' math. |