Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Intercepting IO file access

by blahblahblah (Priest)
on Jul 28, 2007 at 02:53 UTC ( [id://629242]=note: print w/replies, xml ) Need Help??


in reply to Intercepting IO file access

I've never tried the ex::override module mentioned in your update, but I can point you to a similar thing I did a while ago using the subs pragma. After a few rounds of improvements from the great folks here, it worked pretty well. There were a couple of subtle things about open's behavior that I missed initially:

Re: anonymous filehandle for overridden open sub helped me get it right for undefined lexical filehandles

Re: Re: use subs enlightened me somewhat on the difference between lists and arrays, or why I couldn't just pass @_ on to the CORE::open function.

I wouldn't at all be surprised if there are more bugs in my open sub, but my program's use of open is limited to some very simple cases and my sub seems to handle them well enough.

Joe

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-25 23:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found