Andreas J. Koenig wrote:
On Tue, 09 Mar 2010 21:11:34 -0800, Tom Heady <t...@punch.net> said:

  > http://www.cpantesters.org/cpan/report/6912793

Test::Simple 0.95_01 is broken. I think I have already informed Schwern
about the breakage in another ticket but at the moment I cannot find it.

First I've heard of it. Tracked it down, its something specific to DateTime's brand of overloading. And it appears that Test::More is doing its job better now.

If you replace the is($date, $string) calls with ok( $date eq $string ) they still fail. The eq overloading on that object is broken. You can see it with a test like:

    ok( $dt eq '2009-06-22T23:59:00', "eq" );
    ok( "$dt" eq '2009-06-22T23:59:00', "stringified" );

They should be equivalent, but the former will fail. It appears to be a general DateTime problem.

Test::More has a tendency to stringify everything before comparing. We're slowly removing that in order to reveal the underlying overloaded operators. The change in behavior above is exactly why. Unless there's a very good reason, "$obj" eq $string and $obj eq $string should react the same way.


--
29. The Irish MPs are not after "Me frosted lucky charms".
    -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army
           http://skippyslist.com/list/

Reply via email to