Thanks Dave....I'd like to open a bug against UNIVERSAL and include your comments (paraphrased). Would you have any objection to that?
Andrew
--- On Tue, 10/7/08, autarch@urth.org via RT <bug-DateTime-Format-Natural@rt.cpan.org> wrote:
> From: autarch@urth.org via RT <bug-DateTime-Format-Natural@rt.cpan.org>
> Subject: Re: [rt.cpan.org #39844] DateTime::Format::Natural - strange behavior when used with Test::MockObject
> To: abilleb@yahoo.com
> Date: Tuesday, October 7, 2008, 11:47 AM
> <URL:
http://rt.cpan.org/Ticket/Display.html?id=39844
> >
>
> On Tue, 7 Oct 2008, Steven Schubiger wrote:
>
> > Called UNIVERSAL::can() as a function, not a method at
> /usr/local/share/perl/5.8.8/DateTime/Locale.pm line 298
> > at /usr/local/share/perl/5.8.8/UNIVERSAL/can.pm line
> 71
> > UNIVERSAL::can::_report_warning() called at
> /usr/local/share/perl/5.8.8/UNIVERSAL/can.pm line 54
> >
> UNIVERSAL::can::can('DateTime::Locale::en_US',
> 'new') called at
> /usr/local/share/perl/5.8.8/DateTime/Locale.pm line 298
> >
> DateTime::Locale::_load_class_from_id('DateTime::Locale',
> 'en_US') called at
> /usr/local/share/perl/5.8.8/DateTime/Locale.pm line 207
> > DateTime::Locale::load('undef',
> 'en_US') called at
> /usr/local/lib/perl/5.8.8/DateTime.pm line 103
> > DateTime::DefaultLocale('DateTime',
> 'en_US') called at
> /usr/local/lib/perl/5.8.8/DateTime.pm line 113
> > require DateTime.pm called at dtfn.pl line 7
> > main::BEGIN() called at
> /usr/local/lib/perl/5.8.8/DateTime/Infinite.pm line 0
> > eval {...} called at
> /usr/local/lib/perl/5.8.8/DateTime/Infinite.pm line 0
> >
> > I'm CC'ing this bug report to Dave Rolsky (the
> DateTime author).
>
> This is simply a very annoying bug in UNIVERSAL::can where
> it falsely
> reports that ->can() was called as a function in some
> cases.
>
> Not much I can do about it.
>
>
> -dave
>
> /*============================================================
>
http://VegGuide.org http://blog.urth.org
> Your guide to all that's veg House Absolute(ly
> Pointless)
> ============================================================*/