On Dec 3, 2007, at 10:37 PM, Eric Wilhelm wrote:

# from David Golden
# on Monday 03 December 2007 19:55:

With some sugar, that could actually be quite handy for something like
test blocks.  E.g.:

{
  plan add => 2;
  ok( 1, "wibble" );
  ok(1, "wobble" );
}

or maybe make the block a sub

block {
  subplan 2;
  ok(1, "wibble");
  ok(1, "wobble");
};

Or maybe not reinvent the wheel and get tons of extra functionality for free!

use base 'Test::Class';
sub block : Test(2) {
  ok(1, "wibble");
  ok(1, "wobble");
}

Chris

Reply via email to