We had a discussion a while back on how to make CGI.div work, which
ended up with the nasty construct:

  CGI.${"div"}("Foo")

I came across this problem again today, and didn't really want to foist
this on cow-orkers, so I made a simple patch: to Template::Plugin::CGI.
Any chance of having something like this applied?

Thanks,

Tony


--- CGI.pm.old  2004-10-19 14:44:02.000000000 +0000
+++ CGI.pm      2004-10-19 14:47:09.000000000 +0000
@@ -60,6 +60,8 @@
     };
 }

+*Div = \÷
+
 1;

 __END__
@@ -131,6 +133,11 @@
     [% CGI.params.user %]            # abw
     [% CGI.params.item.join(', ') %] # foo, bar

+=head2 Div()
+
+This is an alias for CGI's div() method, to work around the parser
+believing div() to be the math operator.
+
 =head1 AUTHOR

 Andy Wardley E<lt>[EMAIL PROTECTED]<gt>


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

Reply via email to