Edit D:\app\Administrator\product\11.2.0\dbhome_1\perl\html\lib\Fatal.html
<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Fatal - replace functions with equivalents which succeed or die</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rev="made" href="mailto:" /> </head> <body style="background-color: white"> <table border="0" width="100%" cellspacing="0" cellpadding="3"> <tr><td class="block" style="background-color: #cccccc" valign="middle"> <big><strong><span class="block"> Fatal - replace functions with equivalents which succeed or die</span></strong></big> </td></tr> </table> <!-- INDEX BEGIN --> <div name="index"> <p><a name="__index__"></a></p> <ul> <li><a href="#name">NAME</a></li> <li><a href="#synopsis">SYNOPSIS</a></li> <li><a href="#description">DESCRIPTION</a></li> <li><a href="#bugs">BUGS</a></li> <li><a href="#author">AUTHOR</a></li> </ul> <hr name="index" /> </div> <!-- INDEX END --> <p> </p> <h1><a name="name">NAME</a></h1> <p>Fatal - replace functions with equivalents which succeed or die</p> <p> </p> <hr /> <h1><a name="synopsis">SYNOPSIS</a></h1> <pre> use Fatal qw(open close);</pre> <pre> sub juggle { . . . } import Fatal 'juggle';</pre> <p> </p> <hr /> <h1><a name="description">DESCRIPTION</a></h1> <p><code>Fatal</code> provides a way to conveniently replace functions which normally return a false value when they fail with equivalents which raise exceptions if they are not successful. This lets you use these functions without having to test their return values explicitly on each call. Exceptions can be caught using <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlfunc.html#eval"><code>eval{}</code></a>. See <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlfunc.html">the perlfunc manpage</a> and <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlvar.html">the perlvar manpage</a> for details.</p> <p>The do-or-die equivalents are set up simply by calling Fatal's <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlfunc.html#import"><code>import</code></a> routine, passing it the names of the functions to be replaced. You may wrap both user-defined functions and overridable CORE operators (except <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlfunc.html#exec"><code>exec</code></a>, <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlfunc.html#system"><code>system</code></a> which cannot be expressed via prototypes) in this way.</p> <p>If the symbol <code>:void</code> appears in the import list, then functions named later in that import list raise an exception only when these are called in void context--that is, when their return values are ignored. For example</p> <pre> use Fatal qw/:void open close/;</pre> <pre> # properly checked, so no exception raised on error if(open(FH, "< /bogotic") { warn "bogo file, dude: $!"; }</pre> <pre> # not checked, so error raises an exception close FH;</pre> <p> </p> <hr /> <h1><a name="bugs">BUGS</a></h1> <p>You should not fatalize functions that are called in list context, because this module tests whether a function has failed by testing the boolean truth of its return value in scalar context.</p> <p> </p> <hr /> <h1><a name="author">AUTHOR</a></h1> <p>Lionel Cons (CERN).</p> <p>Prototype updates by Ilya Zakharevich <<a href="mailto:ilya@math.ohio-state.edu">ilya@math.ohio-state.edu</a>>.</p> <table border="0" width="100%" cellspacing="0" cellpadding="3"> <tr><td class="block" style="background-color: #cccccc" valign="middle"> <big><strong><span class="block"> Fatal - replace functions with equivalents which succeed or die</span></strong></big> </td></tr> </table> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de