Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by Pascal666 (Scribe)
on Aug 18, 2009 at 03:08 UTC ( [id://789326]=note: print w/replies, xml ) Need Help??


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

I believe your reply contains suggestions for modifying the "if" inside the Perl Module. My question was actually how to modify the object I am passing the module such that it would pass the existing "if" inside the module, so that I do not have to modify the third party module.
  • Comment on Re^2: How to make an IO::Uncompress::Bunzip2 look like a GLOB

Replies are listed 'Best First'.
Re^3: How to make an IO::Uncompress::Bunzip2 look like a GLOB
by Anonymous Monk on Aug 18, 2009 at 06:43 UTC
    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; }

      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;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://789326]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2024-04-20 04:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found