Ovid wrote:

X-Posted to Perlmonks (http://perlmonks.org/index.pl?node_id=483100)

I frequently write code that generates anonymous functions on the fly. However, I often want to verify that these functions are correct without executing them. To this end, I've started writing Test::Code. Here's the start of my test suite (more or less):

  BEGIN { use_ok 'Test::Code' or die }

  ok defined *::is_code{CODE},
    '&is_code should be exported to our namespace';
  is_code sub { 1 }, sub { 1 },
    'Basic subs should match';

[snip balance]

I appreciate the fact that you're working out the interface first -- and in public, no less!

jimk

Reply via email to