Package: libtest-deep-perl
Version: 0.093-1
Severity: normal

If one uses the convenient eq_deeply function 
outside a test scenario (use Test::Deep::NoTest), then 
such a program/module is no longer testable using Test::Deep.

When I build a test that does "use Test::Deep" and then accesses 
cmp_deeply and friends, I get this error message:

"Can't call method "ok" on an undefined value at 
/usr/share/perl5/Test/Deep.pm line 113."

The reason is that while Test:Deep:NoTest avoids pulling in 
test::builder, it enforces this for subsequent 
Test::Deep imports as well, thus breaking Test::Deep.

I'm not sure how this can be fixed best; looks 
like a design issue for the upstream author to ponder.

Maybe it would be best to transplant the code that is not
test-specific to T::D::notest altogether? (and add a 
use T::D::notest in T::D)

for eq_deeply this looks trivial (use T::D::Stack, copy the 8 lines 
of function, done), not certain about the other functions 
that T::D::NoTest exports by default.

For a user of T::D::NoTest, it looks as the only viable temporary workaround 
is to "use T::D"; this pulls in Test::Builder but at least 
doesn't have any major other nasty side effects.

regards
az

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (990, 'stable'), (980, 'testing'), (970, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.19.2
Locale: LANG=C, LC_CTYPE=de_AT (charmap=ISO-8859-1)

Versions of packages libtest-deep-perl depends on:
ii  libtest-tester-perl           0.103-1    Ease testing test Perl modules bui
ii  perl                          5.8.8-7    Larry Wall's Practical Extraction 

libtest-deep-perl recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to