-----BEGIN PGP SIGNED MESSAGE----- Moin,
On Tuesday 07 December 2004 20:33, Kevin Scaldeferri wrote: > I'm wondering if I'm the only one who would love to see > Devel::Cover::Regex? Many (most?) perl programs are pretty regex > heavy, and if we are honest with ourselves, we have to admit that each > regex is actually a program in itself. You can try to throw lots of > inputs at it and hope that you were thorough enough, but most of us > aren't that good at figuring out all the crazy ways a regex could > execute. I think this would be a very useful extension to > Devel::Cover, although I imagine that it's pretty tricky to do. Even > figuring out how to display the results might be tough to do well. > > Occasionally I have fantasies of having enough free time to really dig > into the internals of the regex engine and trying to do this, but to be > honest I don't really see it happening for me. So, I figure the next > best thing is to throw this idea out here and see if anyone else runs > with it. Cool idea. At least for: /^(foo|bar|test)$/ (e.g. constant substrings) you could take note whether the test ever has input that matches them or not. F.i. the regexp above should be at least tested with: foo bar test somethingelse nofoo foono barfoo foobar and probably some variants.. However, I think in my code I would throw foo and bar and test at it and then forget to extend the tests when the regexp mutates to: /^(foo|bar|tests?|foobar)$/ :(=) Best wishes, Tels - -- Signed on Tue Dec 7 20:55:26 2004 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email. "Duke Nukem Forever is a 1999 game and we think that timeframe matches very well with what we have planned for the game." - George Broussard, 1998 (http://tinyurl.com/6m8nh) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iQEVAwUBQbYKuHcLPEOTuEwVAQFMNgf8CJeOeF6T6G05S0Hof2NvfN9uhGjGdrGp aK4+W1z5qHJpMhRGwBUEFDNgx1UHCDjaI5QaJbuNAbhdJn0SmKKcmRhUe5gDckNI lhFV2kYZXq4Ny5L+heRGmKiEOLS4P3ZKDTYX1tDhEm/+qti9FpRZbm26+5Z5K1go Bv7eJKaQGSlRfuzYMz+ZKYQNgWLcHRUcEdnUjGEAIq7qdiztNinEvXdhrjAob4uc 3bBkXXJfyEXHeuEidnhS3g30BawKvdxNMMD4gIfDPzD642HfE4BCyVImdyzsQ+9u CZyZotYbJ31zSE+nGLLzVY4DIa1u2Z4Ybl1o8yPVObguNyrA3VuGmg== =StcX -----END PGP SIGNATURE-----