On Fri, 13 Jul 2001, Jay Buffington wrote:
> Okay, that didn't fix the problem, but I have figured it out.
>
> Apache::Upload returns the filehandle as being blessed into Apache::Upload.
>Whenever I send the filehandle to Image::Magick it thinks that it is a url of type
>Apache: (kind of like file: or http:). If I bless the filehandle into a class that
>does not have a colon in it, it works.
>
> Here is my work around:
>
> ....8<... *snip*
>
> my $fh = $r->upload->fh;
> bless $fh, "nonexistantclass";
> my $error = $image->Read(file=>$fh);
>
> ....8<... *snip*
>
>
> I guess that this is a bug in Apache::Upload and Image::Magick. Apache::Upload
>should not return the filehandle as blessed (I'm confused why it does this in the
>first place) and Image::Magick should do a better job checking to see if it has been
>sent a filehandle.
>
> Can this please be fixed in the next release of libapreq?
its not a bug in libapreq, its perfectly valid for a filehandle to be a
blessed reference. see if using $$fh will make Image::Magick happy.