Subject: | uuencode() does not accept an IO:File variable |
I noticed that uuencode() [and it looks like uudecode()] has the following logic for checking
whether a function argument is a "file handle" of some form (version 0.52):
ref($in) eq 'IO::Handle' or
ref(\$in) eq "GLOB" or
ref($in) eq "GLOB" or
ref($in) eq 'FileHandle'
This means you can not sent in a IO::File variable since ref on this gives 'IO::File'. I think a
better way is to check for UNIVERSAL::isa( $in, 'IO::Handle' ) - although this still doesn't stop you having to check for GLOB/FileHandle.