Subject: | Patches for Image::Xpm build |
When trying to install Image::Info we had problems with it failing the Image::Xpm and Image::Xbm tests. The maintainer tightened up some of the constructor code to test for the existence of the source file, but forgot that the source might actually be a reference to a file handle and this fails the test saying the file is not readable.
These two patches should go back to the maintainer of the Image::X[pb]m perl modules that would be good.
NOTE: Your email address listed in CPAN is currently bouncing (summer at perl press dot com).
diff -urw Image-Xpm-1.09/Xpm.pm Image-Xpm-1.09.patched/Xpm.pm
--- Image-Xpm-1.09/Xpm.pm 2000-11-10 08:05:56.000000000 +1300
+++ Image-Xpm-1.09.patched/Xpm.pm 2004-08-22 17:15:20.000000000 +1200
@@ -167,8 +167,9 @@
$self->{-cc} = ' ' x $self->{-cpp};
my $file = $self->get('-file');
- $self->load if defined $file and -r $file and not $self->{-pixels};
-
+ if (defined $file and not $self->{-pixels}) {
+ $self->load if ref $file or -r $file;
+ }
croak "new() `$file' not found or unreadable"
if defined $file and not defined $self->get('-width');