From d963bf01c4c4db296760b1148f98bf668efcaf58 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sat, 6 Feb 2010 17:55:32 -0800 Subject: Improvements to 31c9a3 - CPAN code did depend on the previous behaviour of blessing filehandles into FileHandle It turns out that it's not quite as simple as blessing into IO::File. If you do (just) that, then it breaks any existing code that does C to allow it to call methods on file handles, because they're blessed into IO::File, which isn't loaded. (Note this code doesn't assume that methods in IO::Seekable are there to be called) So, it all should work if you also set @IO::File:::ISA correctly? That way, code that assumes that methods from IO::Handle can be called will work. However, gv.c now starts complaining (but not failing) if IO::Handle, IO::Seekable and Exporter aren't present, because it goes looking for methods in them. So the solution seems to be to set @IO::File::ISA *and* create (empty) stashes for the other 3 packages. Patch appended, but not applied. --- ext/Devel-Peek/t/Peek.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext') diff --git a/ext/Devel-Peek/t/Peek.t b/ext/Devel-Peek/t/Peek.t index 33958b81d8..fc26157022 100644 --- a/ext/Devel-Peek/t/Peek.t +++ b/ext/Devel-Peek/t/Peek.t @@ -618,7 +618,7 @@ do_test(25, FLAGS = \\(OBJECT\\) IV = 0 # $] < 5.011 NV = 0 # $] < 5.011 - STASH = $ADDR\s+"IO::Handle" + STASH = $ADDR\s+"IO::File" IFP = $ADDR OFP = $ADDR DIRP = 0x0 -- cgit v1.2.1