Skip Menu |

This queue is for tickets about the Template-Toolkit CPAN distribution.

Report information
The Basics
Id: 25468
Status: resolved
Priority: 0/
Queue: Template-Toolkit

People
Owner: Nobody in particular
Requestors: ted [...] tedcarnahan.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.18
Fixed in: (no value)



Subject: [patch] UNIVERSAL::can() warnings in Template::Provider
We often get this warning from Template::Provider using Template-Toolkit-2.18, Linux 2.6.17-11, perl 5.8.8: Called UNIVERSAL::can() as a function, not a method at /usr/local/lib/perl/5.8.8/Template/Provider.pm line 276 To fix this, we applied this patch to Template::Provider: 285c285 < elsif (UNIVERSAL::can($dir, 'paths')) { --- Show quoted text
> elsif (ref($dir) && UNIVERSAL::can($dir, 'paths')) {
Test suite passes after the patch. Thanks, Ted Carnahan
From: HEX [...] cpan.org
Dear Andy, I'm sure you'll be sick to the teeth of hearing about UNIVERSAL::can after that mammoth thread on London.pm recently, so I'm sorry to bring this up again. Given that you said "So it's still valid, but officially Not Recommended.", would you be willing to apply Ted's patch for the next release? I don't rate this at all as high priority, it would just be nice for keeping test output tidy. Thanks, Earle.
On Thu Mar 15 11:57:10 2007, tedcarnahan wrote: Show quoted text
> < elsif (UNIVERSAL::can($dir, 'paths')) { > ---
> > elsif (ref($dir) && UNIVERSAL::can($dir, 'paths')) {
Patch applied, thanks Ted.