Revision 0cd580a9
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/Controller/Base.pm | ||
---|---|---|
157 | 157 |
if (!ref $file_name_or_content) { |
158 | 158 |
$::locale->with_raw_io(\*STDOUT, sub { print while <$file> }); |
159 | 159 |
$file->close; |
160 |
unlink $file_name_or_content if $params{unlink}; |
|
160 | 161 |
} else { |
161 | 162 |
$::locale->with_raw_io(\*STDOUT, sub { print $$file_name_or_content }); |
162 | 163 |
} |
... | ... | |
490 | 491 |
=item * C<name> -- the name presented to the browser; defaults to |
491 | 492 |
C<$file_name>; mandatory if C<$file_name_or_content> is a reference |
492 | 493 |
|
494 |
=item * C<unlink> -- if trueish and C<$file_name_or_content> refers to |
|
495 |
a file name then unlink the file after it has been sent to the browser |
|
496 |
(e.g. for temporary files) |
|
497 |
|
|
493 | 498 |
=back |
494 | 499 |
|
495 | 500 |
=item C<url_for $url> |
Auch abrufbar als: Unified diff
SL::Controller::Base->send_file: neuer Parameter unlink zum Löschen nach Senden