* christopher <christopher at tokpela.com> [2003/12/03 09:40]: > This leaves no distinction between 0 and undef meaning you can never > turn off a default by number, you would always have to use literal > strings like on/off. Although the docs defer to Perl, is this the > desired result or should the DEFAULT directive allow the value of zero?
This is the desired outcome.
You could pass some constants into your template:
use Template;
my $template = Template->new(CONSTANTS => { TRUE => 1, FALSE => 0 });
$template->process(\*DATA) or die $template->error();
And check against constants.TRUE and constants.FALSE instead of simply
testing truth.
(darren)
--
Wise people think all they say; fools say all they think.
pgp00000.pgp
Description: PGP signature
