Edit D:\app\Administrator\product\11.2.0\dbhome_1\perl\html\lib\Tie\Scalar.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>Tie::StdScalar - base class definitions for tied scalars</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"> Tie::StdScalar - base class definitions for tied scalars</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="#more_information">MORE INFORMATION</a></li> </ul> <hr name="index" /> </div> <!-- INDEX END --> <p> </p> <h1><a name="name">NAME</a></h1> <p>Tie::Scalar, Tie::StdScalar - base class definitions for tied scalars</p> <p> </p> <hr /> <h1><a name="synopsis">SYNOPSIS</a></h1> <pre> package NewScalar; require Tie::Scalar;</pre> <pre> @ISA = qw(Tie::Scalar);</pre> <pre> sub FETCH { ... } # Provide a needed method sub TIESCALAR { ... } # Overrides inherited method</pre> <pre> package NewStdScalar; require Tie::Scalar;</pre> <pre> @ISA = qw(Tie::StdScalar);</pre> <pre> # All methods provided by default, so define only what needs be overridden sub FETCH { ... }</pre> <pre> package main;</pre> <pre> tie $new_scalar, 'NewScalar'; tie $new_std_scalar, 'NewStdScalar';</pre> <p> </p> <hr /> <h1><a name="description">DESCRIPTION</a></h1> <p>This module provides some skeletal methods for scalar-tying classes. See <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perltie.html">the perltie manpage</a> for a list of the functions required in tying a scalar to a package. The basic <strong>Tie::Scalar</strong> package provides a <code>new</code> method, as well as methods <code>TIESCALAR</code>, <code>FETCH</code> and <code>STORE</code>. The <strong>Tie::StdScalar</strong> package provides all the methods specified in <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perltie.html">the perltie manpage</a>. It inherits from <strong>Tie::Scalar</strong> and causes scalars tied to it to behave exactly like the built-in scalars, allowing for selective overloading of methods. The <code>new</code> method is provided as a means of grandfathering, for classes that forget to provide their own <code>TIESCALAR</code> method.</p> <p>For developers wishing to write their own tied-scalar classes, the methods are summarized below. The <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perltie.html">the perltie manpage</a> section not only documents these, but has sample code as well:</p> <dl> <dt><strong><a name="tiescalar_classname_list2" class="item">TIESCALAR classname, LIST</a></strong> <dd> <p>The method invoked by the command <code>tie $scalar, classname</code>. Associates a new scalar instance with the specified class. <code>LIST</code> would represent additional arguments (along the lines of <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/lib/AnyDBM_File.html">the AnyDBM_File manpage</a> and compatriots) needed to complete the association.</p> </dd> </li> <dt><strong><a name="fetch_this2" class="item">FETCH this</a></strong> <dd> <p>Retrieve the value of the tied scalar referenced by <em>this</em>.</p> </dd> </li> <dt><strong><a name="store_this_value2" class="item">STORE this, value</a></strong> <dd> <p>Store data <em>value</em> in the tied scalar referenced by <em>this</em>.</p> </dd> </li> <dt><strong><a name="destroy_this8" class="item">DESTROY this</a></strong> <dd> <p>Free the storage associated with the tied scalar referenced by <em>this</em>. This is rarely needed, as Perl manages its memory quite well. But the option exists, should a class wish to perform specific actions upon the destruction of an instance.</p> </dd> </li> </dl> <p> </p> <hr /> <h1><a name="more_information">MORE INFORMATION</a></h1> <p>The <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perltie.html">the perltie manpage</a> section uses a good example of tying scalars by associating process IDs with priority.</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"> Tie::StdScalar - base class definitions for tied scalars</span></strong></big> </td></tr> </table> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de