CC: | mah [...] everybody.org |
Subject: | Missing string comparison overload |
XML::LibXML::NodeList objects are string overloaded but are missing a
string comparison operator. This breaks their masquerading as a string.
This does not effect XML::LibXML's tests but does effect downstream
modules such as POE::Filter::XML::RPC.
Test::More 0.96 will no longer stringify its arguments before comparing,
this was considered a bug. Apologies for the inconvenience. This
reveals string overloaded objects which do not implement a comparison
operator, which is generally an oversight rather than a feature.
We recommend you turn on fallback or implement cmp (which eq will fall
back to), test with Test::More 0.95_02 and release ASAP. Test::More
0.96 is holding off until all affected modules are informed.
Here is a simple cmp implementation.
'cmp' => sub {
my($a, $b, $order) = @_;
return $order ? "$b" cmp "$a" : "$a" cmp "$b"
}