ЭЛЕКТРОННАЯ БИБЛИОТЕКА КОАПП |
Сборники Художественной, Технической, Справочной, Английской, Нормативной, Исторической, и др. литературы. |
7.2.73 Tie::Scalar, Tie::StdScalar - Base Class Definitions for Tied Scalarspackage NewScalar; require Tie::Scalar; @ISA = (Tie::Scalar); sub FETCH { ... } # Provides additional method sub TIESCALAR { ... } # Overrides inherited method package NewStdScalar; require Tie::Scalar; @ISA = (Tie::StdScalar); sub FETCH { ... } package main; tie $new_scalar, "NewScalar"; tie $new_std_scalar, "NewStdScalar"; This module provides some skeletal methods for scalar-tying classes.
(See Chapter 5 for a list of the functions required in tying a scalar to
a package.) The basic Tie::Scalar package provides a For developers wishing to write their own tied-scalar classes, methods are summarized below. (Chapter 5 not only documents these, but also has sample code.)
7.2.73.1 See alsoChapter 5 has a good example using tied scalars to associate process IDs with priority. |