in reply to Re^2: How to make an IO::Uncompress::Bunzip2 look like a GLOB
in thread How to make an IO::Uncompress::Bunzip2 look like a GLOB

The 3rd party module has a giant bug, it needs to be fixed. But
{ local @GLOB::ISA = ref $obj; bless $obj, 'GLOB'; broken_module($obj); bless $obj, @GLOB::ISA; }

Replies are listed 'Best First'.
Re^4: How to make an IO::Uncompress::Bunzip2 look like a GLOB
by Pascal666 (Scribe) on Aug 24, 2009 at 04:32 UTC

    Thank you. That does indeed get me past the initial "if". Unfortunately the restore part of your code does not appear to work. With that code I get:

    Can't locate object method "READ" via package "1"

    If I change your last line to

    bless $obj, 'IO::Uncompress::Bunzip2';

    then it works correctly. Thank you for your help.

      Foiled by prototypes again
      bless $obj, shift @GLOB::ISA;