in reply to Checking two scalars in Test::More $expected. It works, but is it proper?
You wrote:
use Mymodule qw( values ); use Test::More qw(no_plan); BEGIN { use_ok('Mymodule', qw( values )) };
Guess what happens if Mymodule causes an error, like returning false or dieing. Your test script will die, because it can't load Mymodule. It won't execute the use_ok test. Drop the explicit use Mymodule line and let use_ok do the work.
BTW: using Test::More without a plan is not a good plan.
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Checking two scalars in Test::More $expected. It works, but is it proper?
by gctaylor1 (Hermit) on Mar 29, 2009 at 18:06 UTC |