NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Context? (Score:2)
Have you checked the context that the like_xpath() call is invoked in? It looks to me like it should be in void context, and probably, it isn't.
This often bites me with Data::Dump::Streamer, where Dump() needs to be in void context to print anything. And a bare Dump statement, more often than not, is in scalar or list context.
Argh! I wish Perl required explicit return (as in Javascript) to return values, so context of statements would always be void unless explicitly overridden.
Re:Context? (Score:2)
The context in which it's called doesn't matter. I'm reading the code now and it shouldn't make any difference. Of course, sometimes just adding a comment to the like_xpath code causes these tests to pass, but only in the example above. In the actual test, it still fails about 1 out of 5 runs.
Well, that's not quite true. It now fails about 1 out of 8 runs after a fresh checkout. However, the failure above stopped failing as soon as I checked it in to source control and checked it back out again.
Reply to This
Parent