Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 72585c35

Von Moritz Bunkus vor fast 13 Jahren hinzugefügt

  • ID 72585c35d48589e072325ffc46c720df080e2ca1
  • Vorgänger c29f804f
  • Nachfolger 8dc39e5b

$::form-Variablen in Druckbefehlen verfügbar machen

Fix für Bugs 1740 und 1761.

Unterschiede anzeigen:

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