On Wed, Sep 30, 2009 at 11:36 AM, Felipe Gasper (cPanel)
<[email protected]>wrote:

> Hello,
>
>        Is there a way in TT2 that I can access a subroutine reference?
>
> e.g.:
> [% do_something( sub_ref ) -%]
>
> ....
>
> sub do_something {
>        my $sub_ref = shift();
>        my $obj = shift();
>        return &{ $sub_ref }( $obj );
> }
>
>
[% do_someting( \sub_ref ) %]


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

Reply via email to