Skip Menu |
 

This queue is for tickets about the Barcode-Code128 CPAN distribution.

Report information
The Basics
Id: 14850
Status: resolved
Priority: 0/
Queue: Barcode-Code128

People
Owner: WRW [...] cpan.org
Requestors: mca+cpanrt [...] sanger.ac.uk
Cc:
AdminCc:

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



Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.417 (Entity 5.417)
Subject: Missing DESTROY method / install tests fail
X-RT-Original-Encoding: iso-8859-1
Content-Length: 3254
Download (untitled) / with headers
text/plain 3.1k
(Also seen at http://www.issociate.de/board/goto/465877/problem_with_Barcode::Code128.html ) I unpacked Barcode-Code128-2.00.tar.gz from CPAN, and tried to build. The tests for install fail as follows, deskpro261[mca]46: cd Barcode-Code128-2.00 deskpro261[mca]47: ls Changes lib Makefile.PL MANIFEST README t deskpro261[mca]48: perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Barcode::Code128 deskpro261[mca]49: make test cp lib/Barcode/Code128.pm blib/lib/Barcode/Code128.pm PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/barcode....ok 2/2 (in cleanup) Unrecognized option (destroy) for Barcode::Code128 at t/barcode.t line 0 t/barcode....ok t/gif........ok 1/0skipped all skipped: no reason given t/png........NOK 2 (in cleanup) Unrecognized option (destroy) for Barcode::Code128 at t/png.t line 0 t/png........FAILED test 2 Failed 1/2 tests, 50.00% okay Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/png.t 2 1 50.00% 2 1 test skipped. Failed 1/3 test scripts, 66.67% okay. 0/4 subtests failed, 100.00% okay. make: *** [test_dynamic] Error 255 deskpro261[mca]50: uname -a Linux deskpro261 2.6.8-2-686 #1 Mon Jan 24 03:58:38 EST 2005 i686 GNU/Linux deskpro261[mca]51: cat /etc/debian_version 3.1 deskpro261[mca]52: dpkg -s perl [...] Version: 5.8.4-8 [...] This because the object destructor DESTROY is being interpretted by AUTOLOAD as an option. The CPAN installer will correctly install the module if you tell it "force install Barcode::Code128". Here's a fix to v2.00 that might be suitable for distribution, deskpro261[mca]59: diff -u lib/Barcode/Code128.pm{~,} --- lib/Barcode/Code128.pm~ 2001-05-28 22:39:54.000000000 +0100 +++ lib/Barcode/Code128.pm 2005-09-30 12:16:58.000000000 +0100 @@ -286,6 +286,7 @@ my($self, @args) = @_; use vars qw($AUTOLOAD); (my $opt = lc $AUTOLOAD) =~ s/^.*:://; + return if $opt eq 'destroy'; $self->option($opt, @args); } In my code using this module I took a patch-it approach, but this is rather fragile: sub _barcode_pattern { my ($widg, $data) = @_; my $bc = Barcode::Code128->new(); [...] my $str = $bc->barcode($data); # string /^[ #]+$/ for light & dark stripes undef $bc; # Barcode::Code128 v2.00 thinks DESTROY is an invalid # configuration option, and therefore croaks in its own # destructor. Null implementation provided below. return $str; } # Trickery to fix croaking noise, see above BEGIN { no strict 'refs'; die "About to replace Barcode::Code128::DESTROY - ok in v2.00 but this is $Barcode::Code128::VERSION" if *{"Barcode::Code128::DESTROY"}{CODE}; } sub Barcode::Code128::DESTROY { } I add the null DESTROY method prevents AUTOLOAD being called, after first checking that I'm not replacing some existing code.
Return-Path: <william.ward [...] gmail.com>
X-Original-To: bug-Barcode-Code128 [...] rt.cpan.org
Delivered-To: cpan-bug+barcode-code128 [...] diesel.bestpractical.com
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 7CD864D80DC for <bug-Barcode-Code128 [...] rt.cpan.org>; Fri, 30 Sep 2005 13:41:43 -0400 (EDT)
Received: (qmail 28241 invoked by alias); 30 Sep 2005 17:41:30 -0000
X-Spam-Check-BY: la.mx.develooper.com
Received-SPF: pass (x1.develooper.com: domain of william.ward [...] gmail.com designates 66.249.82.206 as permitted sender)
Received: from xproxy.gmail.com (HELO xproxy.gmail.com) (66.249.82.206) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 30 Sep 2005 10:41:25 -0700
Received: by xproxy.gmail.com with SMTP id s16so1523617wxc for <bug-Barcode-Code128 [...] rt.cpan.org>; Fri, 30 Sep 2005 10:41:21 -0700 (PDT)
Domainkey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:references; b=MgsG+0/LyS8SNaHJRjO2sStWRRUi1TQDSklq4GCXLsNrT7qXVlW0UKt7YBSg+h9uW7TSkmRzRurdrJ9CcmUfAXk4wn8onps20E4NNh2MQlfYjjmgRy3gSN9bXbUrc9DOkEFfGQvnNksVMJoqtfhvCxZBzKn1EKY5t6yPGetxdTk=
Received: by 10.70.8.8 with SMTP id 8mr990942wxh; Fri, 30 Sep 2005 10:41:21 -0700 (PDT)
Received: by 10.70.15.16 with HTTP; Fri, 30 Sep 2005 10:41:21 -0700 (PDT)
Message-ID: <3d2fe1780509301041h3e36c5f7tdb5f7c881b1cd07 [...] mail.gmail.com>
Date: Fri, 30 Sep 2005 10:41:21 -0700
From: Bill Ward <bill [...] wards.net>
Reply-To: Bill Ward <bill [...] wards.net>
Sender: william.ward [...] gmail.com
To: bug-Barcode-Code128 [...] rt.cpan.org
Subject: Re: [cpan #14850] Missing DESTROY method / install tests fail
In-Reply-To: <rt-14850-44477.9.70253030329602 [...] cpan.org>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_Part_4858_29988505.1128102081561"
References: <rt-14850 [...] cpan> <rt-14850-44477.9.70253030329602 [...] cpan.org>
X-Virus-Checked: Checked
RT-Send-Cc:
Content-Length: 0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
X-RT-Original-Encoding: iso-8859-1
Content-Length: 3480
Download (untitled) / with headers
text/plain 3.3k
On 9/30/05, Guest via RT <bug-Barcode-Code128@rt.cpan.org> wrote: Show quoted text
> > > This message about Barcode-Code128 was sent to you by guest <> via > rt.cpan.org <http://rt.cpan.org> > > Full context and any attached attachments can be found at: > <URL: https://rt.cpan.org/Ticket/Display.html?id=14850 > > > (Also seen at > http://www.issociate.de/board/goto/465877/problem_with_Barcode::Code128.html) > > I unpacked Barcode-Code128-2.00.tar.gz from CPAN, and tried to build. The > tests for install fail as follows, > > deskpro261[mca]46: cd Barcode-Code128-2.00 > deskpro261[mca]47: ls > Changes lib Makefile.PL MANIFEST README t > deskpro261[mca]48: perl Makefile.PL > Checking if your kit is complete... > Looks good > Writing Makefile for Barcode::Code128 > deskpro261[mca]49: make test > cp lib/Barcode/Code128.pm blib/lib/Barcode/Code128.pm > PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" > "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t > t/barcode....ok 2/2 (in cleanup) Unrecognized option (destroy) for > Barcode::Code128 at t/barcode.t line 0 > t/barcode....ok > t/gif........ok 1/0skipped > all skipped: no reason given > t/png........NOK 2 (in cleanup) Unrecognized option (destroy) for > Barcode::Code128 at t/png.t line 0 > t/png........FAILED test 2 > Failed 1/2 tests, 50.00% okay > Failed Test Stat Wstat Total Fail Failed List of Failed > > ------------------------------------------------------------------------------- > t/png.t 2 1 50.00% 2 > 1 test skipped. > Failed 1/3 test scripts, 66.67% okay. 0/4 subtests failed, 100.00% okay. > make: *** [test_dynamic] Error 255 > deskpro261[mca]50: uname -a > Linux deskpro261 2.6.8-2-686 #1 Mon Jan 24 03:58:38 EST 2005 i686 > GNU/Linux > deskpro261[mca]51: cat /etc/debian_version > 3.1 > deskpro261[mca]52: dpkg -s perl > [...] > Version: 5.8.4-8 > [...] > > This because the object destructor DESTROY is being interpretted by > AUTOLOAD as an option. The CPAN installer will correctly install the module > if you tell it "force install Barcode::Code128". > > Here's a fix to v2.00 that might be suitable for distribution, > > deskpro261[mca]59: diff -u lib/Barcode/Code128.pm{~,} > --- lib/Barcode/Code128.pm~ 2001-05-28 22:39:54.000000000 +0100 > +++ lib/Barcode/Code128.pm 2005-09-30 12:16:58.000000000 +0100 > @@ -286,6 +286,7 @@ > my($self, @args) = @_; > use vars qw($AUTOLOAD); > (my $opt = lc $AUTOLOAD) =~ s/^.*:://; > + return if $opt eq 'destroy'; > $self->option($opt, @args); > } > > > In my code using this module I took a patch-it approach, but this is > rather fragile: > > sub _barcode_pattern { > my ($widg, $data) = @_; > > my $bc = Barcode::Code128->new(); > [...] > my $str = $bc->barcode($data); # string /^[ #]+$/ for light & dark stripes > > undef $bc; > # Barcode::Code128 v2.00 thinks DESTROY is an invalid > # configuration option, and therefore croaks in its own > # destructor. Null implementation provided below. > > return $str; > } > > # Trickery to fix croaking noise, see above > BEGIN { > no strict 'refs'; > die "About to replace Barcode::Code128::DESTROY - ok in v2.00 but this is > $Barcode::Code128::VERSION" > if *{"Barcode::Code128::DESTROY"}{CODE}; > } > sub Barcode::Code128::DESTROY { } > > I add the null DESTROY method prevents AUTOLOAD being called, after first > checking that I'm not replacing some existing code. >
Thanks! I don't know why this was never reported before. -- Help save the San Jose Earthquakes - http://www.soccersiliconvalley.com/
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
X-RT-Original-Encoding: iso-8859-1
Content-Length: 5626
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.417 (Entity 5.417)
From: mca+cpanrt [...] sanger.ac.uk
X-RT-Original-Encoding: iso-8859-1
Content-Length: 3145
[bill@wards.net - Fri Sep 30 13:41:48 2005]: Show quoted text
> Thanks! I don't know why this was never reported before.
I think there must be something else going on. Tests have passed for the same version, according to http://testers.cpan.org/show/Barcode-Code128.html Maybe it's something new since 5.8.1? Perhaps UNIVERSAL used to have a DESTROY method? I haven't investigated, sorry. Also I forgot the detailed Perl version info: deskpro261[mca]42: perl -V Summary of my perl5 (revision 5 version 8 subversion 4) configuration: Platform: osname=linux, osvers=2.4.27-ti1211, archname=i386-linux-thread-multi uname='linux kosh 2.4.27-ti1211 #1 sun sep 19 18:17:45 est 2004 i686 gnulinux ' config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i386-linux -Dprefix=/usr -Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.8.4 -Dsitearch=/usr/local/lib/perl/5.8.4 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm -Duseshrplib -Dlibperl=libperl.so.5.8.4 -Dd_dosuid -des' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -I/usr/local/include' ccversion='', gccversion='3.3.5 (Debian 1:3.3.5-9)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt perllibs=-ldl -lm -lpthread -lc -lcrypt libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libperl.so.5.8.4 gnulibc_version='2.3.2' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT Built under linux Compiled at Mar 8 2005 19:51:48 @INC: /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-9461-1184642887-1193.14850-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 282
Download (untitled) / with headers
text/plain 282b
I looked into some of the PASS reports on cpantesters and found that they all only PASS because they skip the test for some reason. I have now tested 2 times with PASS and 109 times with FAIL but on the cpantesters page you do not see the count because we do not send duplicates.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-9461-1184709583-631.14850-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
From: WRW [...] cpan.org
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 3380
Download (untitled) / with headers
text/plain 3.3k
I have released version 2.01 with the change suggested below. On Fri Sep 30 07:31:01 2005, guest wrote: Show quoted text
> (Also seen at >
http://www.issociate.de/board/goto/465877/problem_with_Barcode::Code128.html Show quoted text
> ) > > I unpacked Barcode-Code128-2.00.tar.gz from CPAN, and tried to build. > The tests for install fail as follows, > > deskpro261[mca]46: cd Barcode-Code128-2.00 > deskpro261[mca]47: ls > Changes lib Makefile.PL MANIFEST README t > deskpro261[mca]48: perl Makefile.PL > Checking if your kit is complete... > Looks good > Writing Makefile for Barcode::Code128 > deskpro261[mca]49: make test > cp lib/Barcode/Code128.pm blib/lib/Barcode/Code128.pm > PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" > "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t > t/barcode....ok 2/2 (in cleanup) Unrecognized option (destroy) > for Barcode::Code128 at t/barcode.t line 0 > t/barcode....ok > t/gif........ok 1/0skipped > all skipped: no reason given > t/png........NOK 2 (in cleanup) Unrecognized option (destroy) > for Barcode::Code128 at t/png.t line 0 > t/png........FAILED test 2 > Failed 1/2 tests, 50.00% okay > Failed Test Stat Wstat Total Fail Failed List of Failed >
------------------------------------------------------------------------------- Show quoted text
> t/png.t 2 1 50.00% 2 > 1 test skipped. > Failed 1/3 test scripts, 66.67% okay. 0/4 subtests failed, 100.00% > okay. > make: *** [test_dynamic] Error 255 > deskpro261[mca]50: uname -a > Linux deskpro261 2.6.8-2-686 #1 Mon Jan 24 03:58:38 EST 2005 i686 > GNU/Linux > deskpro261[mca]51: cat /etc/debian_version > 3.1 > deskpro261[mca]52: dpkg -s perl > [...] > Version: 5.8.4-8 > [...] > > This because the object destructor DESTROY is being interpretted by > AUTOLOAD as an option. The CPAN installer will correctly install the > module if you tell it "force install Barcode::Code128". > > Here's a fix to v2.00 that might be suitable for distribution, > > deskpro261[mca]59: diff -u lib/Barcode/Code128.pm{~,} > --- lib/Barcode/Code128.pm~ 2001-05-28 22:39:54.000000000 +0100 > +++ lib/Barcode/Code128.pm 2005-09-30 12:16:58.000000000 +0100 > @@ -286,6 +286,7 @@ > my($self, @args) = @_; > use vars qw($AUTOLOAD); > (my $opt = lc $AUTOLOAD) =~ s/^.*:://; > + return if $opt eq 'destroy'; > $self->option($opt, @args); > } > > > In my code using this module I took a patch-it approach, but this is > rather fragile: > > sub _barcode_pattern { > my ($widg, $data) = @_; > > my $bc = Barcode::Code128->new(); > [...] > my $str = $bc->barcode($data); # string /^[ #]+$/ for light & > dark stripes > > undef $bc; > # Barcode::Code128 v2.00 thinks DESTROY is an invalid > # configuration option, and therefore croaks in its own > # destructor. Null implementation provided below. > > return $str; > } > > # Trickery to fix croaking noise, see above > BEGIN { > no strict 'refs'; > die "About to replace Barcode::Code128::DESTROY - ok in v2.00 > but this is $Barcode::Code128::VERSION" > if *{"Barcode::Code128::DESTROY"}{CODE}; > } > sub Barcode::Code128::DESTROY { } > > I add the null DESTROY method prevents AUTOLOAD being called, after > first checking that I'm not replacing some existing code.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-9449-1184709620-816.14850-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 39
Version 2.01 appears to fix this issue.


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.