Skip Menu |
 

This queue is for tickets about the Imager CPAN distribution.

Report information
The Basics
Id: 18561
Status: resolved
Priority: 0/
Queue: Imager

People
Owner: Nobody in particular
Requestors: avi [...] finkel.org
Cc:
AdminCc:

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



Subject: Imager fails compile due to unloaded module "Imager::Color::Float"
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1144307655-26997-2"
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 868
Download (untitled) / with headers
text/plain 868b
The attached file demonstrates the problem. When calling "setpixel" (and probably other similar methods) on an Imager object, with a color value as an arrayref, with all 0 values for the color, the Imager code attempts to create the color object as an instance of Imager::Color::Float. However, this file is not loaded by any modules loaded by simplying using Imager, so the compile fails with this error: Can't locate object method "new" via package "Imager::Color::Float" at /usr/lib/perl5/site_perl/5.8.6/x86_64-linux-thread-multi/Imager.pm line 535. The user-space fix for this is to always say "use Imager::Color::Float" after "use Imager". The distribution-level fix for this is probably to put "use Imager::Color::Float" in Imager.pm. Or, to fix the code in _color() surrounding the line in question, because that stuff all looks a little bit shady to me.
Subject: imager.pl
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1144307655-26997-1"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: application/x-perl; name="imager.pl"
Content-Disposition: inline; filename="imager.pl"
Content-Transfer-Encoding: base64
Content-Length: 169
Download imager.pl
text/x-perl 169b
#!/usr/bin/perl use Imager; # use Imager::Color::Float; my $i = Imager->new( xsize => 50, ysize => 50, ); $i->setpixel( x => 10, y => 10, color => [0, 0, 0], );
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.5.HEAD-11951-1144366951-1809.18561-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: 245
Download (untitled) / with headers
text/plain 245b
Thanks for reporting this. Looking at this I can see a few different issues it can cause, since most of the low level code expected Imager::Color objects not Imager::Color::Float. For 0.51 I'll remove that branch and add some regression tests.


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.