Skip Menu |

This queue is for tickets about the Image-Info CPAN distribution.

Report information
The Basics
Id: 6558
Status: resolved
Worked: 2 hours (120 min)
Priority: 0/
Queue: Image-Info

People
Owner: TELS [...] cpan.org
Requestors: jpo [...] di.uminho.pt
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 1.16
  • 1.17
  • 1.18
  • 1.19
Fixed in: 1.20

Attachments
Image-Info-1.18.patch
Image-Xbm-1.08-Xbm.pm.patch
Image-Xpm-1.09-Xpm.pm.patch



Subject: Image::Info 1.16 -> fails two tests
Image::Info version fails two tests from t/string.t. Output ====== $ make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/bmp.........ok t/dim.........ok t/exif........ok t/png.........ok t/string......FAILED tests 9-10 Failed 2/10 tests, 80.00% okay t/tiny-pgm....ok Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/string.t 10 2 20.00% 9-10 Failed 1/6 test scripts, 83.33% okay. 2/22 subtests failed, 90.91% okay. make: *** [test_dynamic] Error 255 $ make test TEST_VERBOSE=1 ... t/string......1..10 ... ok 7 # img/test.svg ok 8 # img/test.xbm not ok 9 # img/test.xpm not ok 10 FAILED tests 9-10 Failed 2/10 tests, 80.00% okay
From: jpo [...] di.uminho.pt
I managed to resolve the problem by patching the modules Image::Xbm and Image::Xpm (both are Image::Info requirements), but I would like to know if this is the best approach. Patches will follow in other comments.
Subject: Image::Xbm patch
From: jpo [...] di.uminho.pt
diff -ru Image-Xbm-1.08/Xbm.pm Image-Xbm-1.08-patched/Xbm.pm --- Image-Xbm-1.08/Xbm.pm 2000-11-09 19:05:51.000000000 +0000 +++ Image-Xbm-1.08-patched/Xbm.pm 2004-06-08 01:27:20.000000000 +0100 @@ -140,7 +140,7 @@ } my $file = $self->get( '-file' ) ; - $self->load if defined $file and -r $file and not $self->{'-bits'} ; + $self->load if defined $file and not $self->{'-bits'} ; croak "new() `$file' not found or unreadable" if defined $file and not defined $self->get( '-width' ) ;
Subject: Image::Xpm patch
From: jpo [...] di.uminho.pt
diff -ru Image-Xpm-1.09/Xpm.pm Image-Xpm-1.09-patched/Xpm.pm --- Image-Xpm-1.09/Xpm.pm 2000-11-09 19:05:56.000000000 +0000 +++ Image-Xpm-1.09-patched/Xpm.pm 2004-06-08 01:32:55.000000000 +0100 @@ -167,7 +167,7 @@ $self->{-cc} = ' ' x $self->{-cpp}; my $file = $self->get('-file'); - $self->load if defined $file and -r $file and not $self->{-pixels}; + $self->load if defined $file and not $self->{-pixels}; croak "new() `$file' not found or unreadable" if defined $file and not defined $self->get('-width');
From: ville.skytta [...] iki.fi
Show quoted text
> Image::Info version fails two tests from t/string.t.
See also https://rt.cpan.org/NoAuth/Bug.html?id=4260
I am the new maintainer for Image::Info - but not for Image::Xbm and Image::Xpm and these haven't been updated since 2000 :( Unsure what to do now. best wishes, Tels
From: jpo [...] di.uminho.pt
Tels, On Sat Jan 28 07:17:48 2006, TELS wrote: Show quoted text
> I am the new maintainer for Image::Info - but not for Image::Xbm and > Image::Xpm and these haven't been updated since 2000 :( > > Unsure what to do now.
Thanks for your message. I have been packaging the perl Image::* modules for the Fedora Extras (and the older Fedora.us project) for the past 20 months. At the time it was decided to patch Image::Info instead. We were able to overcome the test failures by changing the way XBM and XPM new objects were instantiated. Image::Info::XBM.pm ------------------- - my $i = Image::Xbm->new(-file, $source); + my $i = Image::Xbm->new(); + $i->load($source); Image::Info::XPM.pm ------------------- - my $i = Image::Xpm->new(-file, $source); + my $i = Image::Xpm->new(); + $i->load($source); This way it loads the files without checks, in particular without the -r check (Image::X[bp]m.pm). Best regards, jpo
Subject: Image::Info 1.17 -> fails two tests
From: jpo [...] di.uminho.pt
Tels, I forgot to mention that the pod_cov.t test in Image::Info 1.17 is producing several warnings: Output ------ ... t/pod_cov.....Warning: Use of "require" without parentheses is ambiguous at (eval 6) line 1. t/pod_cov.....ok 1/6Warning: Use of "require" without parentheses is ambiguous at (eval 8) line 1. t/pod_cov.....ok 2/6Warning: Use of "require" without parentheses is ambiguous at (eval 10) line 1. t/pod_cov.....ok 3/6Warning: Use of "require" without parentheses is ambiguous at (eval 12) line 1. t/pod_cov.....ok 4/6Warning: Use of "require" without parentheses is ambiguous at (eval 14) line 1. t/pod_cov.....ok 5/6Warning: Use of "require" without parentheses is ambiguous at (eval 16) line 1. t/pod_cov.....ok ... Regards, jpo
I applied your patch, and also found the problem with pod_cov.t (was an insidious "Image::Info.pm" vs "Image::Info :-) The just released 1.18 should fix the problems. If you have further problems, please don't hesitate to report them. Thanx again for your report and time, much appreciated, Tels
From: jpo [...] di.uminho.pt
Tels, On Fri Mar 03 10:32:03 2006, TELS wrote: Show quoted text
> The just released 1.18 should fix the problems. If you have further > problems, please don't hesitate to report them.
There is a problem in XPM.pm (missing semicolon). --- Image-Info-1.18-orig/lib/Image/Info/XPM.pm 2006-03-03 14:21:45.000000000 +0000 +++ Image-Info-1.18/lib/Image/Info/XPM.pm 2006-03-03 17:32:57.000000000 +0000 @@ -13,7 +13,7 @@ $info->push_info(0, "Warn", shift); }; - my $i = Image::Xpm->new() + my $i = Image::Xpm->new(); # loading the file as a seperate step avoids a "-r" test, this would # file with in-memory strings (aka fake files) $i->load($source);
Subject: Re: [rt.cpan.org #6558] Image::Info 1.16 -> fails two tests
Date: Fri, 3 Mar 2006 18:52:29 +0100
To: bug-Image-Info [...] rt.cpan.org
From: Tels <nospam-abuse [...] bloodgate.com>
Moin, On Friday 03 March 2006 18:36, Guest via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=6558 > > > Tels, > > On Fri Mar 03 10:32:03 2006, TELS wrote:
> > The just released 1.18 should fix the problems. If you have further > > problems, please don't hesitate to report them.
> > There is a problem in XPM.pm (missing semicolon). > > --- Image-Info-1.18-orig/lib/Image/Info/XPM.pm 2006-03-03 > 14:21:45.000000000 +0000 > +++ Image-Info-1.18/lib/Image/Info/XPM.pm 2006-03-03 > 17:32:57.000000000 +0000 > @@ -13,7 +13,7 @@ > $info->push_info(0, "Warn", shift); > }; > > - my $i = Image::Xpm->new() > + my $i = Image::Xpm->new(); > # loading the file as a seperate step avoids a "-r" test, this > would # file with in-memory strings (aka fake files) > $i->load($source);
Arg. And I missed that, because I have Image::Xpm not installed and thus the test was never loaded :( Thanx for the report, 1.19 will come shortly, Best wishes, Tels -- Signed on Fri Mar 3 18:51:52 2006 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email. "Trust us, Duke Nukem Forever will rock when it comes out next year." - Joe Siegler, 1999 (http://tinyurl.com/6m8nh)
Download (untitled)
application/pgp-signature 481b

Message body not shown because it is not plain text.

From: jpo [...] di.uminho.pt
Tels, On Fri Mar 03 12:58:56 2006, nospam-abuse@bloodgate.com wrote: Show quoted text
> Arg. And I missed that, because I have Image::Xpm not installed and thus > the test was never loaded :( > > Thanx for the report, 1.19 will come shortly,
There are a couple more problems with the test suite. Three pod coverage tests are failing and the string.t tests fail to detect the requirements (still trying to figure it out). ---------- ... # Coverage for Image::Info::SVG is 0.0%, with 1 naked subroutine: # process_file t/pod_cov.....NOK 5# Failed test (t/pod_cov.t at line 31) # Coverage for Image::Info::XBM is 0.0%, with 1 naked subroutine: # process_file t/pod_cov.....NOK 6# Failed test (t/pod_cov.t at line 31) # Coverage for Image::Info::XPM is 0.0%, with 1 naked subroutine: # process_file # Looks like you failed 3 tests of 6. t/pod_cov.....dubious Test returned status 3 (wstat 768, 0x300) DIED. FAILED tests 4-6 Failed 3/6 tests, 50.00% okay t/string......ok 14/20# svg requires XML::Simple t/string......ok 16/20# xbm requires Image::XBM t/string......ok 18/20# xpm requires Image::XPM ... ------------ Regards, jpo
Tels, In the previous comment I omitted a couple of lines. The full test output should have been: ---------- PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/bmp.t t/dim.t t/exif.t t/png.t t/pod.t t/pod_cov.t t/string.t t/tiny-pgm.t t/bmp.........ok t/dim.........ok t/exif........ok t/png.........ok t/pod.........ok t/pod_cov.....ok 3/6 # Failed test (t/pod_cov.t at line 31) # Coverage for Image::Info::SVG is 0.0%, with 1 naked subroutine: # process_file t/pod_cov.....NOK 4 # Failed test (t/pod_cov.t at line 31) # Coverage for Image::Info::XBM is 0.0%, with 1 naked subroutine: # process_file t/pod_cov.....NOK 5 # Failed test (t/pod_cov.t at line 31) # Coverage for Image::Info::XPM is 0.0%, with 1 naked subroutine: # process_file t/pod_cov.....NOK 6# Looks like you failed 3 tests of 6. t/pod_cov.....dubious Test returned status 3 (wstat 768, 0x300) DIED. FAILED tests 4-6 Failed 3/6 tests, 50.00% okay t/string......ok 13/20# svg requires XML::Simple t/string......ok 15/20# xbm requires Image::XBM t/string......ok 16/20# xpm requires Image::XPM t/string......ok 4/20 skipped: various reasons t/tiny-pgm....ok Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/pod_cov.t 3 768 6 3 50.00% 4-6 4 subtests skipped. Failed 1/8 test scripts, 87.50% okay. 3/59 subtests failed, 94.92% okay. ----------
From: jpo [...] di.uminho.pt
Tels, I have figured out why some tests were skipped. The Image modules required have the wrong name: Image::XPM -> Image::Xpm Image::XBM -> Image::Xbm I will send you a patch that corrects this problem (should touch a couple of files). Regards, jpo
From: jpo [...] di.uminho.pt
Tels, The patch corrects the following problems: * renames Image::X[BP]PM to Image::X[bp]m * adds the missing semicolon to Image::Info::XPM.pm * changes the way the constructs are used to eliminate a couple of errors (I cleaned too must the previous patch) new() --> new(-width => 0, -height => 0) Outout generated from using only new(); --- t/string......ok 18/20 # Failed test (t/string.t at line 64) # got: 'new() -height must be set at ../lib/Image/Info/XPM.pm line 17 # ' # expected: undef ---- It still leaves the pod coverage problems: PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/bmp.t t/dim.t t/exif.t t/png.t t/pod.t t/pod_cov.t t/string.t t/tiny-pgm.t t/bmp.........ok t/dim.........ok t/exif........ok t/png.........ok t/pod.........ok t/pod_cov.....ok 3/6 # Failed test (t/pod_cov.t at line 31) # Coverage for Image::Info::SVG is 0.0%, with 1 naked subroutine: # process_file t/pod_cov.....NOK 4 # Failed test (t/pod_cov.t at line 31) # Coverage for Image::Info::XBM is 0.0%, with 1 naked subroutine: # process_file t/pod_cov.....NOK 5 # Failed test (t/pod_cov.t at line 31) # Coverage for Image::Info::XPM is 0.0%, with 1 naked subroutine: # process_file t/pod_cov.....NOK 6# Looks like you failed 3 tests of 6. t/pod_cov.....dubious Test returned status 3 (wstat 768, 0x300) DIED. FAILED tests 4-6 Failed 3/6 tests, 50.00% okay t/string......ok 13/20# svg requires XML::Simple t/string......ok 15/20# xbm requires Image::Xbm t/string......ok 17/20# xpm requires Image::Xpm t/string......ok t/tiny-pgm....ok Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/pod_cov.t 3 768 6 3 50.00% 4-6 Failed 1/8 test scripts, 87.50% okay. 3/59 subtests failed, 94.92% okay. jpo
diff -ruN Image-Info-1.18-orig/Changes Image-Info-1.18/Changes --- Image-Info-1.18-orig/Changes 2006-03-03 15:21:35.000000000 +0000 +++ Image-Info-1.18/Changes 2006-03-03 19:49:55.000000000 +0000 @@ -3,7 +3,7 @@ 2006-03-03 v1.18 Tels 61 tests * fix bug #6558: Image::Info 1.16 -> fails two tests (Thanx jpo!) + make string.t use strict, Test::More and simplify it - + let string.t skip tests if Image::XPM, Image::XBM or XML::Simple + + let string.t skip tests if Image::Xpm, Image::Xbm or XML::Simple are not installed (these would formerly silently fail) + Image::Info::XPM and Image::Info::XBM now handle in-memory files better + fix also pod_cov.t warnings (was "Image::Info.pm" vs "Image::Info") diff -ruN Image-Info-1.18-orig/lib/Image/Info/XBM.pm Image-Info-1.18/lib/Image/Info/XBM.pm --- Image-Info-1.18-orig/lib/Image/Info/XBM.pm 2006-03-03 15:08:04.000000000 +0000 +++ Image-Info-1.18/lib/Image/Info/XBM.pm 2006-03-03 19:52:45.000000000 +0000 @@ -10,8 +10,8 @@ $info->push_info(0, "Warn", shift); }; - my $i = Image::Xbm->new(); - # loading the file as a seperate step avoids a "-r" test, this would + my $i = Image::Xbm->new(-width => 0, -height => 0); + # loading the file as a separate step avoids a "-r" test, this would # file with in-memory strings (aka fake files) $i->load($source); diff -ruN Image-Info-1.18-orig/lib/Image/Info/XPM.pm Image-Info-1.18/lib/Image/Info/XPM.pm --- Image-Info-1.18-orig/lib/Image/Info/XPM.pm 2006-03-03 14:21:45.000000000 +0000 +++ Image-Info-1.18/lib/Image/Info/XPM.pm 2006-03-03 19:52:54.000000000 +0000 @@ -13,8 +13,8 @@ $info->push_info(0, "Warn", shift); }; - my $i = Image::Xpm->new() - # loading the file as a seperate step avoids a "-r" test, this would + my $i = Image::Xpm->new(-width => 0, -height => 0); + # loading the file as a separate step avoids a "-r" test, this would # file with in-memory strings (aka fake files) $i->load($source); diff -ruN Image-Info-1.18-orig/Makefile.PL Image-Info-1.18/Makefile.PL --- Image-Info-1.18-orig/Makefile.PL 2006-03-03 13:20:21.000000000 +0000 +++ Image-Info-1.18/Makefile.PL 2006-03-03 19:50:11.000000000 +0000 @@ -93,8 +93,8 @@ requires 'IO::String' => 1.03 if $] < 5.008; -recommends 'Image::XPM' => 0, - 'Image::XBM' => 0, +recommends 'Image::Xpm' => 0, + 'Image::Xbm' => 0, 'XML::Simple' => 0; build_requires 'Test::More' => 0.42; diff -ruN Image-Info-1.18-orig/t/string.t Image-Info-1.18/t/string.t --- Image-Info-1.18-orig/t/string.t 2006-03-03 10:59:03.000000000 +0000 +++ Image-Info-1.18/t/string.t 2006-03-03 19:50:32.000000000 +0000 @@ -19,8 +19,8 @@ my $requires = { - xpm => 'Image::XPM', - xbm => 'Image::XBM', + xpm => 'Image::Xpm', + xbm => 'Image::Xbm', svg => 'XML::Simple', };
Subject: Re: [rt.cpan.org #6558] Image::Info 1.16 -> fails two tests
Date: Fri, 3 Mar 2006 21:40:11 +0100
To: bug-Image-Info [...] rt.cpan.org
From: Tels <nospam-abuse [...] bloodgate.com>
Moin, On Friday 03 March 2006 21:13, Guest via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=6558 > > > Tels, > > The patch corrects the following problems: > * renames Image::X[BP]PM to Image::X[bp]m > * adds the missing semicolon to Image::Info::XPM.pm > * changes the way the constructs are used to eliminate > a couple of errors (I cleaned too must the previous patch) > new() --> new(-width => 0, -height => 0)
Oh my god what a mess I created :-/ Thanx a lot for your patches, after I have recovered from todays debug marathon, I will release 1.19 tomorrow. As for the coverage problems, I couldn't find out why the coverage said ok even tho it shouldn't, and then released it w/o thinking about the problem. Seems it was a problem on my system (when the "require module" fails, pod_coverage reports ok (instead of missing pod or cannot load file). Best wishes, Tels -- Signed on Fri Mar 3 21:38:38 2006 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email. 'Wie Ludger Lügenboldt, Sprecher der Interessengemeinschaft Förderer der Prostitution International (I.F.P.I.) jetzt bekannt gab, entstehen der Zuhälterbrache jährlich Milliardenverluste durch kostenfreien Sex. "Bestimmt hätten unsere Mädels im Jahr 2003 alleine in Deutschland 2000 Millionen Quickies mehr verkaufen können, wenn die Leute nicht immer mehr privat rumvögeln würden. Der uns entstandene Schaden beläuft sich auf mindestens 100000000000 Euro." Schuld sei nach Angaben Lügenboldts das Internet: "Flirtportale und Singlewebsites mit Kontaktbörsen machen unser Geschäft kaputt. Amateure rauben uns unserer Geschäftsgrundlagen." Zehntausende von Arbeitsplätzen in Deutschland seien gefährdet, die überdies gerade geringer qualifizieren jungen Frauen ein Einkommen sicherten. Die I.F.P.I. fordert den Gesetzgeber auf, diesem Treiben umgehend Schranken zu setzen.' MI-Boykotteur at 2004-05-07 at http://tinyurl.com/35qjo
Download (untitled)
application/pgp-signature 481b

Message body not shown because it is not plain text.

From: jpo [...] di.uminho.pt
Tels, I think there is a problem with the latest version of Module::Install included with Image::Info 1.19 - I'm unable to generate the Makefile: ---------- $ perl Makefile.PL String found where operator expected at Makefile.PL line 89, near "name 'Image-Info'" (Do you need to predeclare name?) String found where operator expected at Makefile.PL line 94, near "requires 'IO::String'" (Do you need to predeclare requires?) String found where operator expected at Makefile.PL line 96, near "recommends 'Image::Xpm'" (Do you need to predeclare recommends?) String found where operator expected at Makefile.PL line 100, near "build_requires 'Test::More'" (Do you need to predeclare build_requires?) String found where operator expected at Makefile.PL line 102, near "license 'perl'" (Do you need to predeclare license?) String found where operator expected at Makefile.PL line 104, near "author 'Tels <nospam-abuse@bloodgate.com>'" (Do you need to predeclare author?) syntax error at Makefile.PL line 89, near "name 'Image-Info'" syntax error at Makefile.PL line 94, near "requires 'IO::String'" Bareword "auto_install" not allowed while "strict subs" in use at Makefile.PL line 110. Bareword "WriteAll" not allowed while "strict subs" in use at Makefile.PL line 113. Execution of Makefile.PL aborted due to compilation errors. ---------- But if I add the following line, which existed in the previous version of Module::Install, I'm able to generate it. ---------- $ diff -u Image-Info-1.19-orig/inc/Module/Install.pm Image-Info-1.19/inc/Module/ --- Image-Info-1.19-orig/inc/Module/Install.pm 2006-03-05 09:15:08.000000000 +0000 +++ Image-Info-1.19/inc/Module/Install.pm 2006-03-06 19:18:22.000000000 +0000 @@ -35,6 +35,8 @@ use File::Path (); use FindBin; +@inc::Module::Install::ISA = 'Module::Install'; + sub autoload { my $self = shift; my $who = $self->_caller; ---------- Regards, jpo
From: jpo [...] di.uminho.pt
Tels, Are you planning to release a new version of Image::Info during the next days? I am asking this because I would like to update the perl-Image-Info package of Fedora Extras. Thanks in advance, jpo
From: jpo [...] di.uminho.pt
Tels, This ticket can be closed (I can't close it). The xbm/xpm tests are ok now (Image-Info-1.20 beta). Opening a new ticket about the TIFF test failure. jpo
On Mon Mar 13 12:59:53 2006, guest wrote: Show quoted text
> Tels, > > This ticket can be closed (I can't close it).
Yes, only the owner can close bugs. Show quoted text
> The xbm/xpm tests are ok now (Image-Info-1.20 beta).
Cool! I will close this bug shortly after the 1.20 release so that I can tag it with "fixed in 1.20". Thanx for your work! Show quoted text
> Opening a new ticket about the TIFF test failure.
Very good. Hopefully this can be closed soon, too. Best wishes, Tels Show quoted text
> > jpo