Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-Deep CPAN distribution.

Report information
The Basics
Id: 61620
Status: open
Priority: 0/
Queue: Test-Deep

People
Owner: Nobody in particular
Requestors: mauricio [...] arareko.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.106
Fixed in: (no value)



Subject: Test::Deep doesn't export some documented functions
Download (untitled) / with headers
text/plain 1.2k
Test::Deep doesn't seem to be handling its exports very well. The script below shows a basic example: ----------------------------------------------- #!/usr/bin/perl -w use strict; use Test::Deep; my $got = 'Hello'; my $expected = 'World'; # this works unless(eq_deeply($got, $expected)) { print "this works fine!\n---\n"; } # this doesn't work print "found an error!\n"; my ($ok, $stack) = cmp_details($got, $expected); unless ($ok) { print deep_diag($stack); } ----------------------------------------------- Running the script gives the following: [mauricio@hardrock] ~ % perl test.pl this works fine! --- found an error! Undefined subroutine &main::cmp_details called at test.pl line 19. Manually importing the desired functions seem to do the trick: -use Test::Deep; +use Test::Deep qw(cmp_details deep_diag eq_deeply); ----------------------------------------------- [mauricio@hardrock] ~ % perl test.pl this works fine! --- found an error! Compared $data got : 'Hello' expect : 'World' ----------------------------------------------- I originally found this while creating my own test class with Test::Deep::NoTest, which experiences the same error (as it imports Test::Deep under the hood). Hope this was clear enough. Regards, Mauricio.
Subject: Re: [rt.cpan.org #61620] Test::Deep doesn't export some documented functions
Date: Fri, 24 Sep 2010 21:49:21 +0100
To: bug-Test-Deep [...] rt.cpan.org
From: Fergal Daly <fergal [...] esatclear.ie>
Download (untitled) / with headers
text/plain 282b
It's not clearly documented what is and isn't exported (there is another bug open for that) some are exported by default but others that are much less likely to be used are not. I don't have time to clear this up. In fact I think it's time I found a maintainer for this module, F
Yup, there should be documentation for the functions that aren't exported by default.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.