Skip Menu |

This queue is for tickets about the Test-MockObject CPAN distribution.

Report information
The Basics
Id: 48177
Status: rejected
Priority: 0/
Queue: Test-MockObject

People
Owner: Nobody in particular
Requestors: hisso [...] cpan.org
Cc:
AdminCc:

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



Subject: use Test::MockObject generates warnings from UNIVERSAL::can
When using Test::MockObject I get errors like these: Called UNIVERSAL::can() as a function, not a method at /Library/Perl/5.8.8/DateTime/Locale.pm line 298 Called UNIVERSAL::can() as a function, not a method at /Library/Perl/5.8.6/Class/Container.pm line 422 If I comment out "use Test::MockObject" the messages stop (but of course, my tests fail. :-) Is this actually a bug in my code, someone else's code or the Test::MockObject module? Is it even a bug at all?
Show quoted text
> Is this actually a bug in my code, someone else's code or the > Test::MockObject module? Is it even a bug at all?
This is a bug in DateTime::Locale and Class::Container - as the error says, UNIVERSAL::can should not be called as a function. See 'perldoc UNIVERSAL' for more elaboration on why this is a bad idea.
Closing ticket, as per previous elaboration.