Re: [code-review] Please review String::FlexMatch
Fergal Daly <[email protected]> Sun, 7 Sep 2003 23:26:04 +0100
| Newsgroups | gmane.comp.lang.perl.code-review-ladder |
|---|---|
| Message-ID | <[email protected]> |
On Friday 05 September 2003 14:43, Tony Bowden wrote: > On Fri, Sep 05, 2003 at 11:58:39AM +0200, Marcel Gr?nauer wrote: > > I completely agree. Do you think the extra line > > in Test::More::_deep_check(), namely > > defined(overload::Method($_, '""')) && $_ = "$_" for $e1, $e2; > > as discussed in a previous mail would enforce this behaviour? If so, > > I could write a patch and tests against 5.8.1-RC4 and propose them to > > p5p. > > Sounds like the wrong place to put it to me ... how does is() cope with > two overloaded references? is_deeply should do it the same way (ideally > by just calling is ...) If you're going to do it, I think Marcel is right. You can't call is() as this will trigger a full test result. Actually, is() is just shorthand for Test::Builder->is_eq, which I think think is a better name as it's more explicit. If you're going to do it, it's a bit more complicated than the above, it needs to be asymmetric and you should check for overloading of "", eq and maybe even ne and arguably 0+, == and != also... F