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.
  • You test looks good!
    And I really like that line:

    plan +@tests;

    Simple, obvious! :)

    • You test looks good! And I really like that line:

      plan +@tests;

      Simple, obvious! :)

      Thank you. :) I wish I could take more credit for it, though. It's mostly stolen from Test::Base, which does this:

      plan tests => 1 * blocks;

      Perhaps having seen it before made me want to re-invent it in Perl 6.

      (Actually, it could be even easier, if I had put the plan call inside the test method in the Test::InputOutput module. That way, the module user wouldn't have had to call plan at all. But doing that felt like a breach of freedom on the part of the module user: what if she wanted to plan more tests than those sent to the test method? I was going to write about that in the post, but I decided to write code instead.)