Re: [code-review] Please review String::FlexMatch
Fergal Daly <[email protected]> Mon, 8 Sep 2003 17:38:39 +0100
| Newsgroups | gmane.comp.lang.perl.code-review-ladder |
|---|---|
| Message-ID | <[email protected]> |
On Monday 08 September 2003 09:02, Marcel GrĂ¼nauer wrote: > I.e., the constructor (and hence init()) isn't called. Pity. I could include some sort of descender that goes and fixes up all Test::Deep objects but that sounds like work. > You'd have to qr// and eval (for regex and code, respectively) > when getting the attribute value as well, as String::FlexMatch does. You > could add that to Test::Deep so it lends itself more easily to > data-driven > deep testing. You'd have to do more than just that for some of the other types so it's not as simple as that. It's a pity there's no way to get YAML to do Test::Deep->new(arg1, arg2). > The function itself is useful; you need it to test two things you don't > expect to be equal. So maybe just rename it. Yes, I was going to say rename it yesterday but then I started thinking of what to call it and couldn't find something suitable. Maybe match_deeply but I don't really like that. I'll be breaking it all up soon anyway into something like Data::SmartMatch (guess where I go that from ;-) and then Test::Deep will just be a wrapper around that, F