I would like my HTML::Templates to be able to use $ENV variables (mainly $ENV{'SCRIPT_NAME'}). I can do something like (for example):
$template -> param(script_name =>$ENV{'SCRIPT_NAME'};
and
<form method="post" action="<TMPL_VAR NAME='script_name'>
but that's UUUGGGGGGLLLLLLLLLYYYYYYYY.
Can I avoid the necessity to pass the $ENV stuff as parameters?
TIA!
How about:
$template->param(%ENV);
Is that less ugly? I'm not really interested in adding code to do something you can already do in a single line of code!
-sam
Log in to post a comment.
I would like my HTML::Templates to be able to use $ENV variables (mainly $ENV{'SCRIPT_NAME'}). I can do something like (for example):
$template -> param(script_name =>$ENV{'SCRIPT_NAME'};
and
<form method="post" action="<TMPL_VAR NAME='script_name'>
but that's UUUGGGGGGLLLLLLLLLYYYYYYYY.
Can I avoid the necessity to pass the $ENV stuff as parameters?
TIA!
How about:
$template->param(%ENV);
Is that less ugly? I'm not really interested in adding code to do something you can already do in a single line of code!
-sam