Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: 8.152 Thread::SpecificChapter 8
Standard Modules
Next: 8.154 Tie::Handle
 

8.153 Tie::Array, Tie::StdArray

Provides methods for array-tying classes. See the perltie manpage for the functions needed for tying an array to a package. The basic Tie::Array package provides stub DELETE and EXTEND methods, and it implements PUSH, POP, SHIFT, UNSHIFT, SPLICE, and CLEAR in terms of basic FETCH, STORE, FETCHSIZE, and STORESIZE.

Tie::StdArray inherits from Tie::Array and provides the methods needed for tied arrays that are implemented as blessed references to an "inner" Perl array. It causes tied arrays to behave like standard arrays, allowing for selective method overloading.

See the perltie manpage for more detailed information and for examples. To write your own tied arrays, use the following required methods:


Previous: 8.152 Thread::SpecificPerl in a NutshellNext: 8.154 Tie::Handle
8.152 Thread::SpecificBook Index8.154 Tie::Handle