Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: how to make close() fail

by ikegami (Pope)
on Sep 29, 2012 at 01:18 UTC ( #996317=note: print w/replies, xml ) Need Help??


in reply to how to make close() fail

$ perl -MErrno=EIO -E' BEGIN { *CORE::GLOBAL::close = sub { if (caller eq "other::package") { $! = EIO; return 0; } return CORE::close($_[0]); }; } package other::package; close(STDOUT) or die $!; ' Input/output error at -e line 14.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://996317]
help
Chatterbox?
[Corion]: Ask about the median ;)
[jdporter]: posts like this one make me realize, ruefully, just how much my mind has deteriorated in recent years/months.
[jdporter]: "When all your nails look like trolls, all your hammers look like trolls."
erix hammers a jdporter nail randomly

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2018-06-21 16:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (118 votes). Check out past polls.

    Notices?