You are here: Foswiki>Tasks Web>Item606 (30 Dec 2008, WillNorris)Edit Attach

Item606: upload doesn't work with File::IO v1.10

pencil
Priority: Urgent
Current State: Closed
Released In:
Target Release:
Applies To: Engine
Component:
Branches:
Reported By: Foswiki:Main.WillNorris
Waiting For:
Last Change By: WillNorris
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.

ItemTemplate edit

Summary upload doesn't work with File::IO v1.10
ReportedBy Foswiki:Main.WillNorris
Codebase
SVN Range TWiki-4.2.3, Wed, 06 Aug 2008, build 17396
AppliesTo Engine
Component
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:2741d2605f2d distro:1e005fcbabdd
ReleasedIn
Topic revision: r5 - 30 Dec 2008, WillNorris
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy