Require IO::File in IO::Handle
authorDavid Leadbeater <dgl@dgl.cx>
Fri, 8 Apr 2011 20:33:20 +0000 (21:33 +0100)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 11 Apr 2011 01:20:13 +0000 (18:20 -0700)
Since 15e6cdd IO::File has been loaded automatically. However this
automatic loading would not happen in all cases if IO::Handle was
loaded previously. This is due to the @ISA for IO::File being
initialised by the core (see the discussion in [perl #87940]).

By ensuring IO::File is loaded if IO::Handle is the indeterminate
state cannot occur.

dist/IO/lib/IO/Handle.pm

index f6974eb..a7431fa 100644 (file)
@@ -265,10 +265,16 @@ use Symbol;
 use SelectSaver;
 use IO ();     # Load the XS module
 
+# Since perl will automatically require IO::File if needed, but also
+# initialises IO::File's @ISA as part of the core we must ensure
+# IO::File is loaded if IO::Handle is. This avoids effectively
+# "half-loading" IO::File.
+require IO::File;
+
 require Exporter;
 @ISA = qw(Exporter);
 
-$VERSION = "1.30";
+$VERSION = "1.31";
 $VERSION = eval $VERSION;
 
 @EXPORT_OK = qw(