develooper Front page | perl.perl5.porters | Postings from September 2003

puts("foot") on is_deeply() and overloading

From:
Michael G Schwern
Date:
September 10, 2003 19:48
Subject:
puts("foot") on is_deeply() and overloading
Message ID:
20030911024738.GF15680@windhund.schwern.org
Since I have about 1000 messages in my inbox and half of them seem to be
about is_deeply() and overloading and I got tired of watching Tony and
Fergal talk past each other, here's how its going to be.  

Documented or not is_deeply() and is() should treat string and numeric 
overloaded objects as normal strings and numbers.  Its a bug to do 
otherwise.  Changing a string to an overloaded object internally should
not break tests.

Jarkko, unless you get a fix from Fergal RSN, please reverse the is_deeply() 
patch from Fergal in the core.  I'll deal with the problem in the next 
version of Test::More which will happen after 5.8.1.  Sorry, Fergal.
Also, please don't slap on any big DANGER or WARNING comments.  Its just
a bug, not a radiation leak.

Let me make something clear: is_deeply() is a stopgap function.  Its a
cheap way to do complex data handling.  It can only have one behavior which
I try to make as useful and intuitive as possible.  It isn't trying to do 
everything.  Test::Deep can, and I hope will, fill that role.  I'm perfectly 
happy to push all that away from Test::More.


There's a non-zero chance I might change my mind later after reading through
all the arguing, but don't let that hold you up Jarkko.


-- 
Michael G Schwern        schwern@pobox.com  http://www.pobox.com/~schwern/
Cottleston, Cottleston, Cottleston Pie.
A fly can't bird, but a bird can fly.
Ask me a riddle and I reply:
"Cottleston, Cottleston, Cottleston Pie."



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About