I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-06-10 15:27:16-07 by ghendricks
Comparing undef and empty string
First off, thanks so much for Test::Deep. It is a life saver.

I am running into a problem that I hope you can point me in the right direction for solving. I am using Test::Deep to compare the results of a SOAP::Lite XMLRPC call to the original blessed object. The blessed objects come from a database in which some fields are null which become undef in Perl. The problem is that XMLRPC interprets these null fields as empty strings ('') and when I compare the two, it fails. What I am wondering is if there is a way to tell Test::Deep to treat empty string and undef as equal. For that matter it would be great if there was a way to compare any "falsy" value with another or any "truthy" value with another and have it pass.

I have pored over the documentation and have come up empty. Any suggestions?
Direct Responses: 8051 | Write a response