summaryrefslogtreecommitdiff
path: root/opcode.h
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2017-11-22 17:23:57 +0000
committerZefram <zefram@fysh.org>2017-11-22 17:23:57 +0000
commit5f3202fa3e77c4a20de590df045af4683aaedffa (patch)
tree5572a671df6c4586c7d77cf8f98787eb0f457f07 /opcode.h
parent5e1cca32ac612f0b59508a99fbff671a693f39b9 (diff)
downloadperl-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 'opcode.h')
-rw-r--r--opcode.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/opcode.h b/opcode.h
index b5ed37ff35..e1ba36bb52 100644
--- a/opcode.h
+++ b/opcode.h
@@ -1488,7 +1488,7 @@ EXT Perl_check_t PL_check[] /* or perlvars.h */
Perl_ck_bitop, /* complement */
Perl_ck_bitop, /* ncomplement */
Perl_ck_bitop, /* scomplement */
- Perl_ck_smartmatch, /* smartmatch */
+ Perl_ck_null, /* smartmatch */
Perl_ck_fun, /* atan2 */
Perl_ck_fun, /* sin */
Perl_ck_fun, /* cos */
@@ -1897,7 +1897,7 @@ EXTCONST U32 PL_opargs[] = {
0x0000110e, /* complement */
0x0000111e, /* ncomplement */
0x0000111e, /* scomplement */
- 0x00000204, /* smartmatch */
+ 0x00011206, /* smartmatch */
0x0001141e, /* atan2 */
0x00009b9e, /* sin */
0x00009b9e, /* cos */