On Wed, 14 Apr 2004, Tony Bowden wrote:

> On Mon, Mar 01, 2004 at 07:14:58AM -0800, Randal L. Schwartz wrote:
> > >> Luckily, CGI.{"div"} is the same as CGI.div, as far as method calls
> > >> go.  That's the workaround.
> > Tony> Maybe I'm missing something, but:
> > Tony>       [% CGI.("div")({ class => "foo" }, "Foo") %]
> > Yes.  () != {}
>
> OK, stupid bracketing issues aside:
>
>       use Template;
>       my $tt = Template->new;
>       $tt->process(\*DATA) || die $tt->error;
>       __DATA__
>
>       [% USE CGI %]
>       [% CGI.{"div"}("Foo") %]
>
> still gives me:
>
>       file error - parse error - input file handle line 3: unexpected token ({)

You're almost there:

   [% USE CGI %]
   [% CGI.${"div"}("Foo") %]

Dave

/L\_/E\_/A\_/R\_/N\_/T\_/E\_/A\_/C\_/H\_/L\_/E\_/A\_/R\_/N\
Dave Cash                              Power to the People!
Frolicking in Fields of Garlic               Right On-Line!
[EMAIL PROTECTED]                                  Dig it all.

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to