summaryrefslogtreecommitdiff
path: root/embed.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 /embed.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 'embed.h')
-rw-r--r--embed.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/embed.h b/embed.h
index edadfc0611..f726f97980 100644
--- a/embed.h
+++ b/embed.h
@@ -1195,7 +1195,6 @@
#define ck_sassign(a) Perl_ck_sassign(aTHX_ a)
#define ck_select(a) Perl_ck_select(aTHX_ a)
#define ck_shift(a) Perl_ck_shift(aTHX_ a)
-#define ck_smartmatch(a) Perl_ck_smartmatch(aTHX_ a)
#define ck_sort(a) Perl_ck_sort(aTHX_ a)
#define ck_spair(a) Perl_ck_spair(aTHX_ a)
#define ck_split(a) Perl_ck_split(aTHX_ a)
@@ -1665,7 +1664,6 @@
#define optimize_op(a) S_optimize_op(aTHX_ a)
#define pmtrans(a,b,c) S_pmtrans(aTHX_ a,b,c)
#define process_special_blocks(a,b,c,d) S_process_special_blocks(aTHX_ a,b,c,d)
-#define ref_array_or_hash(a) S_ref_array_or_hash(aTHX_ a)
#define refkids(a,b) S_refkids(aTHX_ a,b)
#define scalar_mod_type S_scalar_mod_type
#define scalarboolean(a) S_scalarboolean(aTHX_ a)
@@ -1715,8 +1713,6 @@
# endif
# if defined(PERL_IN_PP_CTL_C)
#define check_type_and_open(a) S_check_type_and_open(aTHX_ a)
-#define destroy_matcher(a) S_destroy_matcher(aTHX_ a)
-#define do_smartmatch(a,b,c) S_do_smartmatch(aTHX_ a,b,c)
#define docatch(a) S_docatch(aTHX_ a)
#define doeval_compile(a,b,c,d) S_doeval_compile(aTHX_ a,b,c,d)
#define dofindlabel(a,b,c,d,e,f) S_dofindlabel(aTHX_ a,b,c,d,e,f)
@@ -1727,8 +1723,6 @@
#define dopoptoloop(a) S_dopoptoloop(aTHX_ a)
#define dopoptosub_at(a,b) S_dopoptosub_at(aTHX_ a,b)
#define dopoptowhen(a) S_dopoptowhen(aTHX_ a)
-#define make_matcher(a) S_make_matcher(aTHX_ a)
-#define matcher_matches_sv(a,b) S_matcher_matches_sv(aTHX_ a,b)
#define num_overflow S_num_overflow
#define path_is_searchable S_path_is_searchable
#define run_user_filter(a,b,c) S_run_user_filter(aTHX_ a,b,c)