Commit | Line | Data |
---|---|---|
137443ea | 1 | my %opt; |
2 | while (@ARGV && $ARGV[0] =~ /^([\w_]+)=(.*)$/) | |
3 | { | |
4 | $opt{$1}=$2; | |
5 | shift(@ARGV); | |
6 | } | |
7bac28a0 | 7 | |
c90c0ff4 | 8 | if ($] =~ /\.(\d\d\d)?(\d\d)?$/) { # should always be true |
9 | $opt{PATCHLEVEL} = int($1 || 0); | |
10 | $opt{SUBVERSION} = $2 || '00'; | |
11 | } | |
12 | ||
137443ea | 13 | while (<>) |
14 | { | |
15 | s/~([\w_]+)~/$opt{$1}/g; | |
16 | $_ = "$1='$opt{$1}'\n" if (/^([\w_]+)=/ && exists($opt{$1})); | |
17 | print; | |
18 | } | |
19 |