summaryrefslogtreecommitdiff
path: root/win32/config_sh.PL
diff options
context:
space:
mode:
Diffstat (limited to 'win32/config_sh.PL')
-rw-r--r--win32/config_sh.PL6
1 files changed, 5 insertions, 1 deletions
diff --git a/win32/config_sh.PL b/win32/config_sh.PL
index e62e47f4f7..020485d66a 100644
--- a/win32/config_sh.PL
+++ b/win32/config_sh.PL
@@ -5,7 +5,11 @@ while (@ARGV && $ARGV[0] =~ /^([\w_]+)=(.*)$/)
shift(@ARGV);
}
-@opt{'PATCHLEVEL','SUBVERSION'} = ($] =~ /\.0*([1-9]+)(\d\d)$/);
+if ($] =~ /\.(\d\d\d)?(\d\d)?$/) { # should always be true
+ $opt{PATCHLEVEL} = int($1 || 0);
+ $opt{SUBVERSION} = $2 || '00';
+}
+
while (<>)
{
s/~([\w_]+)~/$opt{$1}/g;