Have we discovered a bug?

Jonas Brømsø Nielsen <jonasbn-tzJIExVV9u9knbxzx/[email protected]>
Newsgroups gmane.comp.lang.perl.modules.template-toolkit
Message-ID <[email protected]>
Hi,

According to the documentation Template::Toolkit should be able to handle a list of INCLUDE_PATHs.

	http://template-toolkit.org/docs/manual/Config.html#section_INCLUDE_PATH

We have however experienced, that during the traversal of these, traversal is terminated with an error and the remaining INCLUDE_PATHs are not visited.

We located the possible culprit in Template/Provider.pm lines 532-533

	https://metacpan.org/source/ABW/Template-Toolkit-2.22/lib/Template/Provider.pm#L532

 return ( $data, $error )
      if !$error || $error == Template::Constants::STATUS_ERROR;

We have implemented a local hack for now:

return ( $data, $error ) 
     if !$error || ($error == Template::Constants::STATUS_ERROR && $data !~  /No such file or directory/ );

But my question is more, is this a bug or are we doing something the wrong way?

This is a hack, we did to move on with our project, if necessary we will put some effort into creating a proper patch, currently I am unclear as to whether the issue is with _fetch or _load and I have not gotten my head around the tolerant flag.

Thanks,

jonasbn
--
Jonas Brømsø Nielsen, logicLAB
www: http://www.logicLAB.dk/
eml: jonasbn-X5u24mS0fTpknbxzx/[email protected]
mbl: +45 31546056
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.