X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/fca2825c79e6740fd511a2f86df9cb1ff898bfdf..90baed86f02291ceb9a1f2bcf9300a3560817f49:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index 58b1973aa..d537d2838 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1113,8 +1113,13 @@ sub parse_template { } my $result; + my $command_formatter = sub { + my ($out_mode, $out) = @_; + return $out_mode eq '|-' ? SL::Template::create(type => 'ShellCommand', form => $self)->parse($out) : $out; + }; if ($self->{OUT}) { + $self->{OUT} = $command_formatter->($self->{OUT_MODE}, $self->{OUT}); open(OUT, $self->{OUT_MODE}, $self->{OUT}) or $self->error("error on opening $self->{OUT} with mode $self->{OUT_MODE} : $!"); } else { *OUT = ($::dispatcher->get_standard_filehandles)[1]; @@ -1199,6 +1204,8 @@ sub parse_template { #print(STDERR "OUT $self->{OUT}\n"); for my $i (1 .. $self->{copies}) { if ($self->{OUT}) { + $self->{OUT} = $command_formatter->($self->{OUT_MODE}, $self->{OUT}); + open OUT, $self->{OUT_MODE}, $self->{OUT} or $self->error($self->cleanup . "$self->{OUT} : $!"); print OUT $_ while ; close OUT; @@ -2505,7 +2512,7 @@ sub get_name { return scalar(@{ $self->{name_list} }); } -# the selection sub is used in the AR, AP, IS, IR and OE module +# the selection sub is used in the AR, AP, IS, IR, DO and OE module # sub all_vc { $main::lxdebug->enter_sub();