Thanks for pointing this out.
I tried your suggestion, but calling fileno() gives
'Not a GLOB reference' errors if it is called with
other reference types (like a HASH ref).
I think I found a good solution by calling
UNIVERSAL::isa($arg,'GLOB') instead. The only
thing I don't like about this solution is that I now
my package is no longer compatible with Perl
5.002/3. Oh well, I guess requiring 5.004 isn't
a big problem for most people... ;)
This fix will appear in ExifTool 5.03 or later, and
a new release will be uploaded to CPAN probably
sometime this week.
Let me know if you see any problems with this
solution.
Thanks again.
- Phil
[guest - Sat Apr 16 11:52:50 2005]:
Show quoted text> Image-ExifTool 4.87 (and presumably others)
> Perl version: All (I'm doing 5.8.1)
> OS: Any (I'm doing MacOSX)
>
> In sub ParseArguments (and perhaps other places) :
>
> } elsif (ref $arg eq 'GLOB' or ref $arg eq 'SCALAR') {
>
> might be better implemented as:
>
> } elsif ( ( ref $arg and fileno($arg) ) or ref $arg eq 'SCALAR') {
>
> Doing so would it compatible with file GLOBs that have been blessed
> such as those returned by CGI.pm's upload() method.
>
> My current workaround, is to bless them as "GLOB" before passing to
> ExifTool and then reblessing them back to their original state.
>
> Cheers,
>
> --rob