Andy/everyone, I'm really sorry to be bringing this up as it looks
like the whole issue has been a bit of a long one in the past.

I'm running a Catalyst app, everytime I do "make test" I see a lot of
warnings along the lines of

"Calling UNIVERSAL::Can as a function not a method"

which I'm sure you're already quite familiar with. They seem to be
coming from T::Provider and T::Iterator

I see on CPAN:

http://rt.cpan.org/Public/Bug/Display.html?id=25468

that a solution (checking the object is a ref) has already been
proposed for Template::Provider - Although this bug is still marked
open, it looks like the patch is already in my recent install of TT.

Unfortunately, it looks like this isn't quite the right fix. I still
get some warnings from Provider. Probably this is because the method
gets called on unblessed ref's.

The right fix is probably:

use Scalar::Util qw/ blessed /;

.
.
.

if ( blessed $obj && UNIVERSAL::can( $obj, 'whatever') ...


I haven't checked this yet. I'm happy to do so, check that it cleans
up my test output, and submit a patch. If I do so, will you be OK with
that?

Apologies if this has been discussed at great length before - which I
guess it has ...

cheers

Daniel

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to