On Sat, Jul 19, 2008 at 10:41:46AM -0400, Thomas, Mark - BLS CTR wrote:
>    I get a parse error with [% series.year - 1 %]. According to the thread at
>    
> [1]http://www.mail-archive.com/[email protected]/msg05821.html,
>    it is because it is being interpreted as a negative 1 instead of an
>    operator.

I can't get "[% series.year - 1 %]" to raise an error:

---- cut here ----
#!/usr/bin/env perl
use strict;
use warnings;
use Template;

my $template    = Template->new();
my $input       = q{[% series.year - 1%]};
my $data        = { series => {year => 10} };
my $output;

$template->process(\$input, $data, \$output)
    || die $template->error();

print qq{$output\n};
---- cut here ----

[EMAIL PROTECTED]:development$ perl minusone.pl
9

[EMAIL PROTECTED]:development$ perl -MTemplate -le 'print Template->VERSION'
2.19


Chisel
-- 
Chisel Wright
e: [EMAIL PROTECTED]
w: http://www.herlpacker.co.uk/

  My theory is that Lynx is just a way of making chavs more flammable.

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to