my $is_pod_file = !$is_md_file && $source_file !~ /\.pm/;
while ( my $line = <$fh> ) {
- # Look for and turn off any DEVEL_MODE or DEBUG_XXX or VERIFY_XXX constants
+ # Look for and turn off any DEVEL_MODE, DEBUG_XXX, VERIFY_XXX,
+ # and EXPLAIN_XXX constants
if ( $line =~
- /^(\s*use\s+constant\s+(?:DEBUG|DEVEL|VERIFY)_[A-Z]+\s*)=>\s*(-?\d*);(.*)$/
+/^(\s*use\s+constant\s+(?:DEBUG|DEVEL|EXPLAIN|VERIFY)_[A-Z]+\s*)=>\s*(-?\d*);(.*)$/
)
{
if ( $2 != 0 ) {
# produce a lot of output It should be 0 except when debugging small
# scripts.
- use constant VALIGN_DEBUG_FLAG_TABS => 0;
+ use constant DEBUG_TABS => 0;
my $debug_warning = sub {
print STDOUT "VALIGN_DEBUGGING with key $_[0]\n";
return;
};
- VALIGN_DEBUG_FLAG_TABS && $debug_warning->('TABS');
+ DEBUG_TABS && $debug_warning->('TABS');
}
return;
}
+use constant DEBUG_VALIGN => 0;
+
sub valign_input {
# Place one line in the current vertical group.
my $group_level = $self->[_group_level_];
- 0 && do {
+ DEBUG_VALIGN && do {
my $nlines = $self->group_line_count();
print STDOUT
"Entering valign_input: lines=$nlines new #fields= $jmax, leading_count=$leading_space_count force=$is_forced_break, level_jump=$level_jump, level=$level, group_level=$group_level, level_jump=$level_jump\n";
# --------------------------------------------------------------------
# Some old debugging stuff
# --------------------------------------------------------------------
- 0 && do {
+ DEBUG_VALIGN && do {
print STDOUT "exiting valign_input fields:";
dump_array( @{$rfields} );
print STDOUT "exiting valign_input tokens:";
# shouldn't happen - program error counting whitespace
# - skip entabbing
- VALIGN_DEBUG_FLAG_TABS
+ DEBUG_TABS
&& $self->warning(
"Error entabbing in valign_output_step_D: expected count=$leading_space_count\n"
);
# But it could be an outdented comment
if ( $line !~ /^\s*#/ ) {
- VALIGN_DEBUG_FLAG_TABS
+ DEBUG_TABS
&& $self->warning(
"Error entabbing in valign_output_step_D: for level=$level count=$leading_space_count\n"
);
# shouldn't happen - program error counting whitespace
# we'll skip entabbing
- VALIGN_DEBUG_FLAG_TABS
+ DEBUG_TABS
&& $self->warning(
"Error entabbing in valign_output_step_D: expected count=$leading_space_count\n"
);
# shouldn't happen:
if ( $space_count < 0 ) {
- VALIGN_DEBUG_FLAG_TABS
+ DEBUG_TABS
&& $self->warning(
"Error in get_leading_string: for level=$group_level count=$leading_whitespace_count\n"
);