From efc5c7c332b6baa4c90ca3e3de1fba8ce28448ae Mon Sep 17 00:00:00 2001 From: David Leadbeater Date: Fri, 8 Apr 2011 21:33:20 +0100 Subject: [PATCH] Require IO::File in IO::Handle 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 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dist/IO/lib/IO/Handle.pm b/dist/IO/lib/IO/Handle.pm index f6974eb..a7431fa 100644 --- a/dist/IO/lib/IO/Handle.pm +++ b/dist/IO/lib/IO/Handle.pm @@ -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( -- 2.7.4