From: Steve Hancock Date: Sat, 17 Oct 2020 23:04:43 +0000 (-0700) Subject: build turns off any DEBUG flags on VERSION update X-Git-Tag: 20201001.03~69 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=70d378c4063c6ea88eaf98fe70fe8a8a91f13057;p=perltidy.git build turns off any DEBUG flags on VERSION update --- diff --git a/dev-bin/build.pl b/dev-bin/build.pl index 2e64741d..078bb868 100755 --- a/dev-bin/build.pl +++ b/dev-bin/build.pl @@ -628,11 +628,14 @@ sub update_VERSION { my $is_pod_file = !$is_md_file && $source_file !~ /\.pm/; while ( my $line = <$fh> ) { - # Look for and turn off any DEVEL_MODE constants - if ( $line =~ /^\s*use constant DEVEL_MODE\s*=>\s*(\d);/ ) { - if ( $1 != 0 ) { + # Look for and turn off any DEVEL_MODE or DEBUG_XXX constants + if ( $line =~ + /^(\s*use\s+constant\s+(?:DEBUG|DEVEL)_[A-Z]+\s*)=>\s*(-?\d*);(.*)$/ + ) + { + if ( $2 != 0 ) { $line = < 0; +$1 => 0;$3 EOM } }