[Templates] PATCH: Template::Plugin::CGI

[prev] [thread] [next] [Date index for 2004/10/19]

From: Tony Bowden
Subject: [Templates] PATCH: Template::Plugin::CGI
Date: 14:11 on 19 Oct 2004

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>abw@xxxxxxxxxxx.xxxx<gt>


_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] PATCH: Template::Plugin::CGI
Tony Bowden 14:11 on 19 Oct 2004

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52