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

Re: how to make close() fail

by tobyink (Abbot)
on Sep 29, 2012 at 15:13 UTC ( #996392=note: print w/ replies, xml ) Need Help??


in reply to how to make close() fail

Create a "filehandle" using IO::Callback. This allows you to run a callback coderef on file accesses and when the file is closed. The callback can simulate system errors.

In particular, see examples 6 and 7 in the pod.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re: how to make close() fail

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2014-12-29 02:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (184 votes), past polls