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

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

Michael G Schwern
September 10, 2003 19:48
puts("foot") on is_deeply() and overloading
Message ID:
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
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." Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About