[Templates] Newbie question: use perl module within template - how?

Evan Kaufman evan.kaufman@gmail.com
Sun, 9 Jul 2006 18:23:13 -0500


load_perl, like other TT2 parameters, must be set from the calling
program (passed in as a hashref):

$template_config{'load_perl'} = 1;
$template = Template->new( \%template_config );

or, if you're using mod_perl and Apache::Template, it would be set in
the apache config:

TT2LoadPerl  On

On 7/9/06, klaushorsten <email.10@gmx.net> wrote:
> Hallo,
>
> in the manual there is an example:
>
> [% USE file = IO.File('d:\tmp\user') %]
> [% WHILE (line = file.getline) %]
> [% line %]
> [% END %]
>
>
> I get the error
> plugin error - IO.File: plugin not found
>
> I have read that I have to set load_perl to true.
> Can I do this in the template?
>
> IO is in the right place.
>
> I am working on windows.
>
> How do I get this run?
>
> This is my first post here. I am not a perl programmer.
>
> Regards,
>
> Klaus