From 70d378c4063c6ea88eaf98fe70fe8a8a91f13057 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Sat, 17 Oct 2020 16:04:43 -0700 Subject: [PATCH] build turns off any DEBUG flags on VERSION update --- dev-bin/build.pl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 } } -- 2.39.5