#3 path does not work with scalarref

open
nobody
None
5
2001-06-26
2001-06-26
Anonymous
No

TMPL_INCLUDE is unable to find a file that is in the
path if scalarref mode is used. I was able to correct
the problem by the following change to the Template.pm
file

1721c1721
< my @path = split('/',
$options->{filepath});
---
> my @path = split('/', $options->{path});

In words, it is ignoring the path specification when
doing TMPL_INCLUDE.

Here is a fragment of a test case.

my $template = HTML::Template->new (scalarref =>
\$template_string,
path => ["/web/web/cgi-bin/biodata",
$bdpath]);

<TMPL_INCLUDE NAME="table.inc">

Discussion