diff options
author | Karl Williamson <khw@cpan.org> | 2016-02-18 21:47:15 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2016-02-19 10:41:43 -0700 |
commit | 2bfbbbaf9ef1783ba914ff9e9270e877fbbb6aba (patch) | |
tree | 54cc8a3e325702835e3d6794eefd3e159245229b /intrpvar.h | |
parent | c23916c6ad5c8be07a891f00941d5b842631906a (diff) | |
download | perl-2bfbbbaf9ef1783ba914ff9e9270e877fbbb6aba.tar.gz |
Add environment variable for -Dr: PERL_DUMP_RE_MAX_LEN
The regex engine when displaying debugging info, say under -Dr, will elide
data in order to keep the output from getting too long. For example,
the number of code points in all of Unicode matched by \w is quite
large, and so when displaying a pattern that matches this, only the
first some number of them are printed, and the rest are truncated,
represented by "...".
Sometimes, one wants to see more than what the
compiled-into-the-engine-max shows. This commit creates code to read
this environment variable to override the default max lengths. This
changes the lengths for everything to the input number, even if they
have different compiled maximums in the absence of this variable.
I'm not currently documenting this variable, as I don't think it works
properly under threads, and we may want to alter the behavior in various
ways as a result of gaining experience with using it.
Diffstat (limited to 'intrpvar.h')
-rw-r--r-- | intrpvar.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/intrpvar.h b/intrpvar.h index 4f558a83bc..50a9ee0a9e 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -807,6 +807,8 @@ PERLVARA(I, op_exec_cnt, OP_max+2, UV) /* Counts of executed OPs of the given ty PERLVAR(I, random_state, PL_RANDOM_STATE_TYPE) +PERLVARI(I, dump_re_max_len, STRLEN, 0) + /* If you are adding a U8 or U16, check to see if there are 'Space' comments * above on where there are gaps which currently will be structure padding. */ |