Re: [code-review] Please review String::FlexMatch
Tony Bowden <[email protected]> Mon, 8 Sep 2003 18:39:17 +0100
| Newsgroups | gmane.comp.lang.perl.code-review-ladder |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Sep 08, 2003 at 05:12:37PM +0100, Fergal Daly wrote: > > Nope. Consider tying. > I have, although I try to consider it as little as possible. I'll reply to the rest in detail tomorrow, but tying *needs* to be considered here, as it provides counter-arguments to almost all your examples and arguments - in particular that is_deeply() should be side-effect free. > There is no way for any test to spot tied values and so there's no way to do > data only tests with tied values without the risk of strange breakage, this > means that data only tests on tied values are of little value, you should be > explicitly testing the data and behaviour of the underlying object. This is fundamentally wrong IMO. For most tests you explicitly don't want to ever care what the underlying object is, or if there even is one. If you need to do that then there should be a different bag of testing tricks in your arsenal other than the 'normal' ones. I think the same is true of "strings" that are actually overloaded objects. Tony