Menu

Access to $ENV values without passing them???

2003-09-04
2003-09-04
  • David Filmer

    David Filmer - 2003-09-04

    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!

     
    • Sam Tregar

      Sam Tregar - 2003-09-04

      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.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.