Stories
Slash Boxes
Comments
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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • 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.

    • 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.

  • my ignorant guess is hash key ordering.
    • I wondered about that myself as I had just worked on a Catalyst bug involving that (one that's fixed in the current version), but the my $anything = undef; line seems to eliminate that thought. Plus, the fact that my small test case which always failed passes if I commit it to Subversion and check the branch again :(

      I've heard anecdotal stories of possible parsing issues in 5.8.8, but I don't see them reported as bugs, so it's tough to say if this is true or if it's related to my problem.

  • Are you able to run it under valgrind or something equivalent?