summaryrefslogtreecommitdiff
path: root/pod/perl5142delta.pod
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2016-03-11 10:36:25 +0100
committerYves Orton <demerphq@gmail.com>2016-03-13 12:39:23 +0100
commitcb41e5d6f2193df9fd06cf60a96285694ec458ba (patch)
tree3c3d1c14ff4fa8705920eaeb1ab6378977d4948c /pod/perl5142delta.pod
parentfebe9c7a66e3a16aba6a75e5550c8005ecb52f10 (diff)
downloadperl-cb41e5d6f2193df9fd06cf60a96285694ec458ba.tar.gz
Rework diagnostics in the regex engine
This introduces three new subs: Perl_re_printf() which is a wrapper for PerlIO_printf( Perl_debug_log, ... ), which cuts down on clutter in the code. Arguably this could be moved to util.c and renamed something like PerlIO_debugf() and then we could declutter all the statements that write to the Perl_debug_log filehandle. But that is a bit too ambituous for me right now, so I leave this as a regex engine only sub for now. Perl_re_indentf() which is a wrapper for PerlIO_re_printf(), which adds an indent argument and automatically indents the line appropriately, and is used in regcomp.c for trace diagnostics during compilation. Perl_re_indentfo() which is similar to Perl_re_indentf() but is used in regexec.c which adds a specific prefix to each indented line to account for the fact that during execution we normally have string position information on the left. The end result of this patch is that a lot of clutter in the debugging statements in the regex engine is reduced, exposing what is actually going on. It should also now be easier to add new diagnostics which "do the right thing". Over time the debugging trace output in regexec has become very cluttered and confusing. This patch cleans much of it up, if something happens at a given recursion depth it is output at the right depth, etc, and formats have been changed to not have leading spaces so you can actually see the indentation properly.
Diffstat (limited to 'pod/perl5142delta.pod')
0 files changed, 0 insertions, 0 deletions