Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Business-ISBN CPAN distribution.

Report information
The Basics
Id: 30291
Status: resolved
Priority: 0/
Queue: Business-ISBN

People
Owner: Nobody in particular
Requestors: rnorwood [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.03
Fixed in: (no value)



Subject: Bugs in png_barcode.t
I noticed a couple of bugs in png_barcode.t test while packaging Business::ISBN for Fedora. The comma at the end of the 'skip' long is wrong - the unless clause isn't a parameter. Also, 'require' is preferred to 'use' unless we want to actually load the module. Patch to fix both of these is included. Without the patch, this test is always skipped, even when GD::Barcode::EAN13 is loaded.
Subject: perl-Business-ISBN-2.03-fix-barcode-test.patch
--- Business-ISBN-2.03/t/png_barcode.t Wed Mar 14 03:21:08 2007 +++ Business-ISBN-2.03/t/png_barcode.t Fri Oct 26 14:58:15 2007 @@ -17,8 +17,8 @@ ok( $isbn->is_valid, "Valid ISBN" ); SKIP: { - skip "Need GD::Barcode::EAN13", 2, - unless eval "use GD::Barcode::EAN13"; + skip "Need GD::Barcode::EAN13", 2 + unless eval "require GD::Barcode::EAN13"; my $png = eval { $isbn->png_barcode }; ok( defined $png, "PNG defined" );
From: BDFOY [...] cpan.org
On Fri Oct 26 15:09:10 2007, rnorwood wrote: Show quoted text
> Patch to fix both of these is included. Without the patch, this test is > always skipped, even when GD::Barcode::EAN13 is loaded.
The real fix is to skip the entire test file if I can't load the module. I've uploaded Business::ISBN 2.03_01 to see how it plays out with CPAN Testers. Thanks, :)