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;
use warnings;
use Test::Most qw<die defer_plan>; # this is what I
_really_ want to do ...
#use Test::Most tests => 3; # but it fails
just as badly this way too
use base qw<Test::Builder::Module>;
our @EXPORT =
(
@Test::Most::EXPORT,
);
1;
#! /usr/bin/perl
# file: test_exports.t
use strict;
use warnings;
use Testit;
eval { lives_ok { 1 } 'gets exports from Test::Exception' } or die();
lives_and { ok(1) } 'gets exports from Test::More';
lives_and { eq_or_diff("line1\n", "line1\n") } 'gets exports from
Test::Differences';
all_done();
Now, running "prove test_exports.t" gives you:
test_exports......Can't call method "lives_ok" without a package or
object reference at test_exports.t line 10.
...propagated at test_exports.t line 10.
# Looks like your test died before it could output anything.
test_exports...... Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 1/1 subtests
Test Summary Report
-------------------
test_exports.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 1 tests but ran 0.
Files=1, Tests=0, 0 wallclock secs ( 0.01 usr 0.01 sys + 0.07 cusr
0.01 csys = 0.10 CPU)
Result: FAIL
BUT, if you go into Test::Most and comment out line 226, thus changing this:
@EXPORT = (
@Test::More::EXPORT,
@Test::Differences::EXPORT,
@Test::Exception::EXPORT,
@Test::Differences::EXPORT,
@Test::Deep::EXPORT,
@Test::Warn::EXPORT,
qw<
explain
restore_fail
die_on_fail
bail_on_fail
all_done
>
);
to this:
@EXPORT = (
@Test::More::EXPORT,
@Test::Differences::EXPORT,
@Test::Exception::EXPORT,
@Test::Differences::EXPORT,
[EMAIL PROTECTED]::Deep::EXPORT,
@Test::Warn::EXPORT,
qw<
explain
restore_fail
die_on_fail
bail_on_fail
all_done
>
);
then it works again. Am _I_ doing something wrong here? It seems
like some bizarre interaction between Test::Deep and ... well,
something. :-)
Any thoughts on what could be causing this?
-- Buddy