X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperltie.pod;h=49bf98999c74452c87a3f9141e367d6a8414e44e;hb=21fff32650ffc8719558f625ca6c5cc49a442d92;hp=c835738573f9622a7876c652e2a595159ab429dd;hpb=9f1b1f2d9ab55954ee07a14c4ab04bd3dd1f99d5;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perltie.pod b/pod/perltie.pod index c835738..49bf989 100644 --- a/pod/perltie.pod +++ b/pod/perltie.pod @@ -260,6 +260,10 @@ index whose value we're trying to fetch. return $self->{ARRAY}[$idx]; } +If a negative array index is used to read from an array, the index +will be translated to a positive one internally by calling FETCHSIZE +before being passed to FETCH. + As you may have noticed, the name of the FETCH method (et al.) is the same for all accesses, even though the constructors differ in names (TIESCALAR vs TIEARRAY). While in theory you could have the same class servicing @@ -281,6 +285,8 @@ there. For example: } return $self->{ARRAY}[$idx] = $value; } + +Negative indexes are treated the same as with FETCH. =item DESTROY this @@ -862,14 +868,11 @@ called: =head1 SEE ALSO See L or L for some interesting tie() implementations. +A good starting point for many tie() implementations is with one of the +modules L, L, L, or L. =head1 BUGS -Tied arrays are I. They are also distinctly lacking something -for the C<$#ARRAY> access (which is hard, as it's an lvalue), as well as -the other obvious array functions, like push(), pop(), shift(), unshift(), -and splice(). - You cannot easily tie a multilevel data structure (such as a hash of hashes) to a dbm file. The first problem is that all but GDBM and Berkeley DB have size limitations, but beyond that, you also have problems