diff options
author | Hugo van der Sanden <hv@crypt.org> | 2021-01-31 22:48:23 +0000 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-02-09 08:42:52 -0800 |
commit | 7127153a0aa372b27a6d28ba8fbbd332ec8e0eab (patch) | |
tree | a2c6a76722d53fc90875b192d98fc83145288d1e /dump.c | |
parent | 07b740f3e29869abb3e282fe6064fdd08a76b6ff (diff) | |
download | perl-7127153a0aa372b27a6d28ba8fbbd332ec8e0eab.tar.gz |
gh18515: extend dumping of PM objects
Include RXf_ flags START_ONLY, WHITE and NULL along with the essentially
similar SKIPWHITE; dump the flags whenever GETRE(pm) succeeds, not only
if there is a check substring.
This allows eg `perl -Dx -e 'split /\s+/'` to show whether the intended
flags have been set.
Diffstat (limited to 'dump.c')
-rw-r--r-- | dump.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -827,7 +827,7 @@ S_do_pmop_dump_bar(pTHX_ I32 level, UV bar, PerlIO *file, const PMOP *pm) else S_opdump_indent(aTHX_ (OP*)pm, level, bar, file, "PMf_PRE (RUNTIME)\n"); - if (pm->op_pmflags || (PM_GETRE(pm) && RX_CHECK_SUBSTR(PM_GETRE(pm)))) { + if (pm->op_pmflags || PM_GETRE(pm)) { SV * const tmpsv = pm_description(pm); S_opdump_indent(aTHX_ (OP*)pm, level, bar, file, "PMFLAGS = (%s)\n", SvCUR(tmpsv) ? SvPVX_const(tmpsv) + 1 : ""); @@ -910,8 +910,14 @@ S_pm_description(pTHX_ const PMOP *pm) if (RX_EXTFLAGS(regex) & RXf_CHECK_ALL) sv_catpvs(desc, ",ALL"); } + if (RX_EXTFLAGS(regex) & RXf_START_ONLY) + sv_catpvs(desc, ",START_ONLY"); if (RX_EXTFLAGS(regex) & RXf_SKIPWHITE) sv_catpvs(desc, ",SKIPWHITE"); + if (RX_EXTFLAGS(regex) & RXf_WHITE) + sv_catpvs(desc, ",WHITE"); + if (RX_EXTFLAGS(regex) & RXf_NULL) + sv_catpvs(desc, ",NULL"); } append_flags(desc, pmflags, pmflags_flags_names); |