in reply to Re: RFC: Another test module - Test::NoPlan
in thread RFC: Another test module - Test::NoPlan

Randomly moving logic into BEGIN blocks is problematic, and you accidentally demonstrated that there.

That code will give a plan of 1 test when you probably wanted 11.

  • Comment on Re^2: RFC: Another test module - Test::NoPlan

Replies are listed 'Best First'.
Re^3: RFC: Another test module - Test::NoPlan
by shmem (Chancellor) on May 21, 2009 at 15:29 UTC
    Randomly moving logic into BEGIN blocks

    Well, its not random: I just set a variable, and nothing wrong with that, except...

    That code will give a plan of 1 test when you probably wanted 11.

    ...the my variable gotcha, where $c is not visible in the BEGIN block. Thanks, corrected.