• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item6494: Attach/remove/attach gives error: Can't call method "binmode" on an undefined value

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed   patch 5.0.1

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


This is a follow-up bug discovered while working on fixing Item6492.

Error message is shown: "TWiki detected an internal error - please check your TWiki logs and webserver logs for more information. Can't call method "binmode" on an undefined value"
when following these steps:

  1. go to attach screen
  2. browse to file 1
  3. browse to file 2
  4. browse to file 3
  5. browse to file 4
  6. remove file 2 and 3 from list (file 1 and 4 left)
  7. browse to file 5
  8. hit [upload]

-- TWiki:Main/PeterThoeny - 15 Jun 2010

This is now fixed in SVN trunk and 5.0 branch.


--- lib/TWiki/Request/Upload.pm     (revision 18861)
+++ lib/TWiki/Request/Upload.pm     (working copy)
@@ -94,7 +94,7 @@

 sub handle {
     my $fh = new IO::File( $_[0]->{tmpname}, '<' );
-    $fh->binmode;
+    $fh->binmode if( $fh );
     return $fh;

-- TWiki:Main.PeterThoeny - 15 Jun 2010

Hi, I am getting the "Can't locate object method "binmode" via package "IO::File" with the Twiki-5.1.4 installed on XP. I also have ActivePerl installed. Anyone else seeting this problem? I checked Upload.pm file, it matches the new updated version. Thanks.

-- TWiki:Main.JayTim - 2013-06-24

Any suggestion on how to update "CPAN:IO::File" library? When I type install IO:File in Perl Package Manager, I see the there are 4 different choices like IO-File-Cached, IO-File-Lockable, IO-File-Multi and IO-File-String, do i need to reinstall all of them? THanks.

-- TWiki:Main.JayTim - 2013-06-24

Summary Attach/remove/attach gives error: Can't call method "binmode" on an undefined value
ReportedBy TWiki:Main.PeterThoeny

SVN Range TWiki-5.0.0, Tue, 08 Jun 2010, build 18947
AppliesTo Engine

Priority Normal
CurrentState Closed

Checkins TWikirev:19035 TWikirev:19036
TargetRelease patch
ReleasedIn 5.0.1
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r5 - 2013-06-24 - JayTim
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback