From bdd1d7ea5dbe81ef852041c7517747ae7a404d03 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 7 May 2012 18:42:41 +0200 Subject: [PATCH] print_html_template auch mit scalarrefs als file aufrufbar gemacht Ausserdem die Fehlermeldung bei nicht korrektem aufruf mit header angeben. --- SL/Form.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SL/Form.pm b/SL/Form.pm index 221f7b1aa..9f0cf11bc 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -594,8 +594,11 @@ sub _prepare_html_template { if (-f "templates/webpages/${file}.html") { $file = "templates/webpages/${file}.html"; + } elsif (ref $file eq 'SCALAR') { + # file is a scalarref, use inline mode } else { my $info = "Web page template '${file}' not found.\n"; + $::form->header; print qq|
$info
|; ::end_of_request(); } -- 2.20.1