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
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1274
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.
From fergald [...] gmail.com Fri Sep 24 16: 46:19 2010
MIME-Version: 1.0
X-Spam-Status: No, score=-9.913 tagged_above=-99.9 required=10 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8, SPF_NEUTRAL=0.686] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-24883-1285360826-1048.61620-4-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-61620 [...] rt.cpan.org> <rt-3.8.HEAD-24883-1285360826-1048.61620-4-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <AANLkTimeoiAcAjCNakW9oRTWy6E3A+r_s8OLeS6e9BfS [...] mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -9.913
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] gmail.com
Authentication-Results: hipster.bestpractical.com (amavisd-new); domainkeys=pass header.sender=fergald [...] gmail.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 78F12240E73 for <cpan-bug+Test-Deep [...] hipster.bestpractical.com>; Fri, 24 Sep 2010 16:46:19 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JZHu7ZpFfCmM for <cpan-bug+Test-Deep [...] hipster.bestpractical.com>; Fri, 24 Sep 2010 16:46:17 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 64E6B240B58 for <bug-Test-Deep [...] rt.cpan.org>; Fri, 24 Sep 2010 16:46:17 -0400 (EDT)
Received: (qmail 14490 invoked by uid 103); 24 Sep 2010 20:49:26 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 24 Sep 2010 20:49:26 -0000
Received: from mail-ew0-f50.google.com (HELO mail-ew0-f50.google.com) (209.85.215.50) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Fri, 24 Sep 2010 13:49:25 -0700
Received: by ewy24 with SMTP id 24so844424ewy.9 for <bug-Test-Deep [...] rt.cpan.org>; Fri, 24 Sep 2010 13:49:22 -0700 (PDT)
Received: by 10.213.12.196 with SMTP id y4mr3511807eby.89.1285361361924; Fri, 24 Sep 2010 13:49:21 -0700 (PDT)
Received: by 10.14.124.195 with HTTP; Fri, 24 Sep 2010 13:49:21 -0700 (PDT)
Delivered-To: cpan-bug+Test-Deep [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #61620] Test::Deep doesn't export some documented functions
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=Bnic/+vnTAhELcZ2NrXBL53T+jfI/ibWHqW7LtUf+M1a7Qo8CdXbyU6T6+XiKDqn5I mJ3A/iAY/l/1iv5PAGEjkut1iqmGacOcHbSZ3C8D/JMUULlnuvoyKdcOdvaUjItOXWJd fedOR9eROIJ/2b0r5hoxjmFn/cla4NxyblIBQ=
Return-Path: <fergald [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=lJbTBstLkwF/vGDEOGjtdnXaXNv9uVHkCmbDITOm90U=; b=ZFqDR8SfplBxbpdyue6YyK6rtdWPak2O/wkB2OuYb0dRscvqhZYLWdxbLHuodp4xbo wOtguzURbc76/RPIY30JqeYScvNFFbyk2+Nl5E3vuo3DR2A2y79YDc+BFUtavDpuEHWs /ZUwBKDpZZpevvVeWHhHeJF8dOqNqBinbLmMY=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+Test-Deep [...] hipster.bestpractical.com
X-RT-Mail-Extension: test-deep
X-Google-Sender-Auth: 9sKYOKsRot1sBOsgwcEDRBWzEuI
Sender: fergald [...] gmail.com
Date: Fri, 24 Sep 2010 21:49:21 +0100
X-Spam-Level:
To: bug-Test-Deep [...] rt.cpan.org
From: Fergal Daly <fergal [...] esatclear.ie>
RT-Message-ID: <rt-3.8.HEAD-24889-1285361371-566.61620-0-0 [...] rt.cpan.org>
Content-Length: 282
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
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-24889-1285361371-566.61620-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <RT-Ticket-61620 [...] rt.cpan.org> <rt-3.8.HEAD-24883-1285360826-1048.61620-4-0 [...] rt.cpan.org> <AANLkTimeoiAcAjCNakW9oRTWy6E3A+r_s8OLeS6e9BfS [...] mail.gmail.com> <rt-3.8.HEAD-24889-1285361371-566.61620-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-8968-1341603036-1916.61620-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 85
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.