I assumed that Test::More would have this in the bag, but went ahead and checked. Test::More certainly handles this already with an unlinke($this, $regex). This should probably be mentioned in the template (which I'm sure is what you meant.) As for matching HOW it matched, that would be an interesting problem. Perhaps a the test harness should accept an arrayref where the first element is the regex and the following should be $1..$9 in order?
like("Hello World", [ /(.+)\s(.+)/, "Hello", "World"]);
Seems like a mouth full but it would handler your case.
Just my two cents.
|