Wassim M. wrote:

> And my $vars has this in it:
>  "set" => get_set()

You should be passing in a reference to a subroutine.  In your example,
you should instead write:

 $vars = { set => \&get_set }  # \&get_set is a ref to the sub get_set

You can also write anonymous subroutines like so.

 $vars = { set => sub { ... your code here ... } }

I'm going to add a section on all the various ways of passing in variables
and stuff to the faq.

Mark.

P.S. There's a directive "SET" so having a routine "set" is probably a bad
idea - I'd call it something else for clarity

-- 
#!/usr/bin/perl -T
use strict;
use warnings;
print q{Mark Fowler, [EMAIL PROTECTED], http://twoshortplanks.com/};



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

Reply via email to