Revision 72585c35
Von Moritz Bunkus vor fast 13 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
1113 | 1113 |
} |
1114 | 1114 |
|
1115 | 1115 |
my $result; |
1116 |
my $command_formatter = sub { |
|
1117 |
my ($out_mode, $out) = @_; |
|
1118 |
return $out_mode eq '|-' ? SL::Template::create(type => 'ShellCommand', form => $self)->parse($out) : $out; |
|
1119 |
}; |
|
1116 | 1120 |
|
1117 | 1121 |
if ($self->{OUT}) { |
1122 |
$self->{OUT} = $command_formatter->($self->{OUT_MODE}, $self->{OUT}); |
|
1118 | 1123 |
open(OUT, $self->{OUT_MODE}, $self->{OUT}) or $self->error("error on opening $self->{OUT} with mode $self->{OUT_MODE} : $!"); |
1119 | 1124 |
} else { |
1120 | 1125 |
*OUT = ($::dispatcher->get_standard_filehandles)[1]; |
... | ... | |
1199 | 1204 |
#print(STDERR "OUT $self->{OUT}\n"); |
1200 | 1205 |
for my $i (1 .. $self->{copies}) { |
1201 | 1206 |
if ($self->{OUT}) { |
1207 |
$self->{OUT} = $command_formatter->($self->{OUT_MODE}, $self->{OUT}); |
|
1208 |
|
|
1202 | 1209 |
open OUT, $self->{OUT_MODE}, $self->{OUT} or $self->error($self->cleanup . "$self->{OUT} : $!"); |
1203 | 1210 |
print OUT $_ while <IN>; |
1204 | 1211 |
close OUT; |
Auch abrufbar als: Unified diff
$::form-Variablen in Druckbefehlen verfügbar machen
Fix für Bugs 1740 und 1761.