if ($newsize >= 0)
{
$val = $obj->FETCH($newsize);
- $obj->SETSIZE($newsize);
+ $obj->STORESIZE($newsize);
}
$val;
}
C<UNSHIFT>, C<SPLICE> and C<CLEAR> in terms of basic C<FETCH>, C<STORE>,
C<FETCHSIZE>, C<STORESIZE>.
-The B<Tie::StdHash> package provides efficient methods required for tied arrays
+The B<Tie::StdArray> package provides efficient methods required for tied arrays
which are implemented as blessed references to an "inner" perl array.
It inherits from B<Tie::Array>, and should cause tied arrays to behave exactly
-like standard hashes, allowing for selective overloading of methods.
+like standard arrays, allowing for selective overloading of methods.
For developers wishing to write their own tied arrays, the required methods
are briefly defined below. See the L<perltie> section for more detailed
=item STORE this, index, value
-Store datum I<value> into I<index> for the tied array assoicated with
+Store datum I<value> into I<index> for the tied array associated with
object I<this>. If this makes the array larger then
class's mapping of C<undef> should be returned for new positions.
=item FETCH this, index
-Retrieve the datum in I<index> for the tied array assoicated with
+Retrieve the datum in I<index> for the tied array associated with
object I<this>.
=item FETCHSIZE this
-Returns the total number of items in the tied array assoicated with
+Returns the total number of items in the tied array associated with
object I<this>. (Equivalent to C<scalar(@array)>).
=item STORESIZE this, count
-Sets the total number of items in the tied array assoicated with
+Sets the total number of items in the tied array associated with
object I<this> to be I<count>. If this makes the array larger then
class's mapping of C<undef> should be returned for new positions.
If the array becomes smaller then entries beyond count should be
=item CLEAR this
-Clear (remove, delete, ...) all values from the tied array assoicated with
+Clear (remove, delete, ...) all values from the tied array associated with
object I<this>.
=item DESTROY this
=item UNSHIFT this, LIST
-Insert LIST elements at the begining of the array, moving existing elements
+Insert LIST elements at the beginning of the array, moving existing elements
up to make room.
=item SPLICE this, offset, length, LIST