Scarborough has asked for the wisdom of the Perl Monks concerning the following question:
I have read and tryed the examples in Object-Oriented Tutorial and coming from a Java background found it very understandable, ten out of ten, thanks.
However I had a feeling that tie had something to do with OO so off I went to http://www.perldoc.com/perl5.8.4/pod/func/tie.html and confusion sets in.
The docs say "A class implementing a hash should have the following methods:
TIEHASH classname, LIST
FETCH this, key
STORE this, key, value
DELETE this, key
CLEAR this
EXISTS this, key
FIRSTKEY this
NEXTKEY this, lastkey
SCALAR this
DESTROY this
UNTIE this"
I don't see these methods in the tutorial, which is implementing an odject as a hash, and still seems to work correctly.
Are there any monks who can direct me on the path to enlightenment.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Confused by OO & tie
by flyingmoose (Priest) on May 17, 2004 at 11:51 UTC | |
by Scarborough (Hermit) on May 17, 2004 at 11:57 UTC | |
Re: Confused by OO & tie
by tilly (Archbishop) on May 17, 2004 at 15:58 UTC | |
Re: Confused by OO & tie
by davido (Cardinal) on May 17, 2004 at 11:58 UTC | |
Re: Confused by OO & tie
by hardburn (Abbot) on May 17, 2004 at 11:59 UTC | |
Re: Confused by OO & tie
by iburrell (Chaplain) on May 17, 2004 at 11:55 UTC | |
Re: Confused by OO & tie
by EdwardG (Vicar) on May 17, 2004 at 11:58 UTC |