summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xmansrv2
1 files changed, 1 insertions, 1 deletions
diff --git a/mansrv b/mansrv
index b4d3cca..25e56e7 100755
--- a/mansrv
+++ b/mansrv
@@ -128,25 +128,25 @@ sub interpret_file($$) {
128 128
129 open($ifd, $file) or syserror("cannot open $file: $!"); 129 open($ifd, $file) or syserror("cannot open $file: $!");
130 my $s = new Safe 'Root' ; 130 my $s = new Safe 'Root' ;
131 %{$s->varglob('ENV')} = %ENV; 131 %{$s->varglob('ENV')} = %ENV;
132 ${$s->varglob('TITLE')} = $ARGV[1]; 132 ${$s->varglob('TITLE')} = $ARGV[1];
133 ${$s->varglob('SECTION')} = $ARGV[0]; 133 ${$s->varglob('SECTION')} = $ARGV[0];
134 ${$s->varglob('PACKAGE')} = $package_name; 134 ${$s->varglob('PACKAGE')} = $package_name;
135 ${$s->varglob('VERSION')} = $VERSION; 135 ${$s->varglob('VERSION')} = $VERSION;
136 ${$s->varglob('SERVER')} = "$ENV{REQUEST_SCHEME}://$ENV{SERVER_NAME}"; 136 ${$s->varglob('SERVER')} = "$ENV{REQUEST_SCHEME}://$ENV{SERVER_NAME}";
137 137
138 while (<$ifd>) { 138 while (<$ifd>) {
139 chomp; 139 chomp;
140 s/\{%(.*)%\}/expand_template($s, $1, $file, $.)/ex; 140 s/\{%(.*?)%\}/expand_template($s, $1, $file, $.)/gex;
141 print $ofd "$_\n"; 141 print $ofd "$_\n";
142 } 142 }
143 close($ifd); 143 close($ifd);
144} 144}
145 145
146sub interpret { 146sub interpret {
147 my $fd = shift; 147 my $fd = shift;
148 foreach my $file (@_) { 148 foreach my $file (@_) {
149 interpret_file($fd, $file); 149 interpret_file($fd, $file);
150 } 150 }
151} 151}
152 152

Return to:

Send suggestions and report system problems to the System administrator.