The value of explaining a problem to yourself like you would to someone else [Was going to be: Program does not do what I want but produces no error messages either]

Tom Hukins tom at
Thu Oct 14 07:44:27 PDT 2010

On Tue, Oct 12, 2010 at 06:21:59PM +0100, Andy Selby wrote:
> the below program does not do this but produces no error messages so I
> think there is something wrong with were it is outputting to.

I realise you've already solved the problem, but I hope you find the
following helpful:

> my $t = new Image::Thumbnail(
>                 size       => "200x200",
>                 create     => 1,
>                 module     => "GD",
>                 input      => $dh,
>                 outputpath => "/home/andy/projects/thumbs",
>         );

I've read the documentation for Image::Thumbnail (under ERRORS) and I
don't understand what it means.  Good luck.  I'd be inclined to check
what $t contains, though - maybe it's undef on error.

Secondly, you're using what's called indirect method syntax by saying
"new Image::Thumbnail(...)".  This can cause subtle problems in your
programs, so I suggest you get into the habit of writing
"Image::Thumbnail->new(...)" instead.  I realise you've just copied
the documentation - various CPAN modules get this wrong.

Finally, it's ages since I've generated thumbnails within Perl, but I
believe people nowadays recommend Imager (pure perl) or Image::Imlib2


More information about the MiltonKeynes-pm mailing list