Item606: upload doesn't work with File::IO v1.10
Priority: Urgent
Current State: Closed
Released In:
Target Release:
Applies To: Engine
Component:
Branches:
the call to
$fh->binmode;
in
lib/Foswiki/Request/Upload.pm
fails because the
binmode
method isn't available in 1.10 (it is in 1.14). however, version 1.10 is what ships with perl 5.8.4. the simple fix is to change the code to:
binmode $fh;
i have done a grep through the subversion repository, and
Upload.pm
was the only instance which used the OO method call.
ALTERNATIVELY,
package IO::File;
sub binmode {
( @_ == 1 or @_ == 2 ) or croak 'usage $fh->binmode([LAYER])';
my($fh, $layer) = @_;
return binmode $$fh unless $layer;
return binmode $$fh, $layer;
}
could be added globally (wherever that may be), conditionally compiled if $IO::File::VERSION < 1.14
made the simple patch and added entry to DEPENDENCIES
setting to "Closed" instead of "Waiting for Release" because i think this change was introduced by FSA.