TT doesn't seem to like the 'div' method in CGI:
-----
#!/usr/bin/perl
use strict;
use warnings;
use CGI;
use Template;
print "\n---------- CGI ----------\n";
my $q = new CGI;
print $q->span({ class => "foo" }, "Foo");
print $q->div({ class => "foo" }, "Foo");
print "\n---------- TT ----------\n";
my $tt = Template->new;
$tt->process(\*DATA) or warn $tt->error;
__DATA__
[%
USE CGI;
CGI.span({ class => "foo" }, "Foo");
CGI.div({ class => "foo" }, "Foo");
%]
-----
Output:
---------- CGI ----------
<span class="foo">Foo</span><div class="foo">Foo</div>
---------- TT ----------
file error - parse error - input file handle line 2-6: unexpected token (div)
[% USE CGI;
CGI.span({ class => "foo" }, "Foo");
CGI.div({ class => "foo" }, "Foo"); %] at test-tt line 16, <DATA> line 1.
My first guess was that CGI.div is being interpreted somewhere as a
vmethod, but I can't find it being defined as such anywhere.
Any ideas?
Thanks,
Tony
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates