in reply to Re^2: Include code in Template Toolkit
in thread Include code in Template Toolkit

See the eval filter in Template::Manual::Filters.

Replies are listed 'Best First'.
Re^4: Include code in Template Toolkit
by heisersch (Initiate) on Jan 11, 2012 at 19:56 UTC
    Hi Mom,
    thanks that is exactly what i was looking for :-)
Re^4: Include code in Template Toolkit
by locked_user sundialsvc4 (Abbot) on Jan 12, 2012 at 04:10 UTC

    Excellent.

    Another thing that I’ve done a few times (frankly, since I overlooked the existence of eval until now ...) was to create another template object-instance, use it to generate some output, then dropped it into a variable.   Which, I presume, is more-or-less what eval does.