* Joe McMahon <[EMAIL PROTECTED]> [2006-07-21 20:45]: > On Jul 21, 2006, at 9:50 AM, A. Pagaltzis wrote: > >I assume it’s because, despite the order in the file, the > >BEGIN block runs before the `plan tests => 2` line. > That's correct; since the "plan" is invoked separately, the > BEGIN block's already long gone by the time "plan" executes. > Putting the plan on the "use Test::More" would fix this. > > >Sure looks like a bug. > Dunno whether it's a doc bug or a real one, though. Maybe the > use_ok should barf if no plan's in place yet (whether it's a > real plan or no_plan).
It should definitely die screaming if you start running tests before you’ve declared your intents for the plan. I can’t see any appeal in the current beahviour: before the plan is declared, tests can run, will produce no output, won’t affect the count, and will leave everyone none the wiser. That doesn’t seem useful for anything. If you don’t have a plan, you can say so; all’s fair if you predeclare. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>