[Templates] Called UNIVERSAL::can() as a function, not a method at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Template/Provider.pm

Dan Fisher dan@askingforthirds.org
Thu, 25 Jan 2007 13:33:52 -0500


------=_Part_33541_3784617.1169750032236
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I'm running into the warning in $subject.

I did a quick search through the templates.mbox file and couldn't find
anyone who's run into this nor do I see it in the changelogs
(I'm using Template-Toolkit 2.15)

My solution/patch (which seems to work) is to change line 286 of
Template/Provider.pm from:

        elsif (UNIVERSAL::can($dir, 'paths')){

to
        elsif ( (ref($dir)) && (UNIVERSAL::can($dir, 'paths')) ){

Since I can't find someone else complaining about this, it's entirely
possible (likely even) that I'm overlooking something.

Thank you for your time,
Daniel Fisher

------=_Part_33541_3784617.1169750032236
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I&#39;m running into the warning in $subject.<br><br>I did a quick search through the templates.mbox file and couldn&#39;t find anyone who&#39;s run into this nor do I see it in the changelogs <br>(I&#39;m using Template-Toolkit 
2.15)<br><br>My solution/patch (which seems to work) is to change line 286 of Template/Provider.pm from:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elsif (UNIVERSAL::can($dir, &#39;paths&#39;)){<br>
<br>to<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elsif ( (ref($dir)) &amp;&amp; (UNIVERSAL::can($dir, &#39;paths&#39;)) ){<br><br>Since I can&#39;t find someone else complaining about this, it&#39;s entirely possible (likely even) that I&#39;m overlooking something.
<br><br>Thank you for your time,<br>Daniel Fisher<br>

------=_Part_33541_3784617.1169750032236--