|Subject:||Imager fails compile due to unloaded module "Imager::Color::Float"|
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.
#!/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], );