Already posted to Perlmonks, but this is killing me at work right now.
http://www.perlmonks.org/?node_id=693163
Basically, using Test::Deep with Test::Class fails horribly.
package TestIt;
use Test::Deep;
use base 'Test::Class';
sub startup : Tests(startup) {}
1;
Trying to
# from Ovid
# on Friday 20 June 2008 07:16:
Invalid CODE attribute: Tests(startup = 1) at TestIt.pm line 9
BEGIN failed--compilation aborted at TestIt.pm line 9.
The 'use base' and load order appear to be trouble.
Either:
use base qw(Test::Class);
use Test::Deep;
sub startup :
--- Eric Wilhelm [EMAIL PROTECTED] wrote:
# from Ovid
# on Friday 20 June 2008 07:16:
Invalid CODE attribute: Tests(startup = 1) at TestIt.pm line 9
BEGIN failed--compilation aborted at TestIt.pm line 9.
The 'use base' and load order appear to be trouble.
Either:
use base
FYI this is not an issue with the latest Test::Deep.
Lessons learned (from this and other problems)
- default exports are just bad
- having an isa() function anywhere is asking for trouble, various
modules will call -isa on every package they see whether it's really
an OO package or not
The
Ovid,
The latter, of course, should assert the number of tests you expected
to run, not the number of tests you've actually run. Otherwise, it's
not much better than no_plan (except you're still protected from
premature exits.
Or, to look at it a different way, it would be _exactly_
Ovid,
I've just uploaded Test::Most 0.02 to the cpan.
Crap ... you fixed that typo. :)
I meant to let you know about this, but I got totally distracted
before I could pin it down. So now I've got it down fairly sparse
here ... create two files:
# file: Testit.pm
package Testit;
use strict;