|go ahead... be a heretic|
Re: Do Storable and IO::Zlib like to play together?by sauoq (Abbot)
|on Nov 03, 2005 at 19:32 UTC||Need Help??|
Solving this is going to take some effort. Here is a small piece of code that reproduces the error:
The error (message) is the same but I'm not positive the error itself is. In particular, $AUTOLOAD in this instance is IO::Zlib::FILENO (not READ) and it is being called from Storable::_store_fd (which is in _store_fd.al) which is in turn being called by Storable::nstore_fd (in nstore_fd.al)... But, going back and printing the argument when in each of those functions shows it to be IO::Zlib=GLOB(0x81242f8) which is a glob ref as desired. It is only when we get to Zlib's AUTOLOAD that it prints as IO::Zlib=HASH(0x81b84b8). So, it looks like the call to fileno() in _store_fd() is where things are breaking.
And, sure enough...
That's a minimal demonstration of the problem. (So, you can stop looking at Storable as the real problem, anyway.)
Adding some quick prints to see what's going on...
And running that:
Changing fileno($fh) to $fh->fileno results in:
Ick! Where's that "IO::Zlib::ILENO" coming from?
Oh well, that's where I'm at now. I've got to set it down for a bit as I have real paying work to do. :-) Maybe you or someone else would like to pick up there. I'll look deeper later on if no one else nails it.
-sauoq "My two cents aren't worth a dime.";