X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBM%2FDeep%2FArray.pm;h=247d7307c3998c747cde8262928e830e6c1afde4;hb=2ba14e04118fbfa4f41947ac9273b97ca1cb78e2;hp=4b8a2ccef622b365a900eb93a929b81dd107734e;hpb=29460253533b4890344f08679ef361713588112e;p=dbsrgits%2FDBM-Deep.git diff --git a/lib/DBM/Deep/Array.pm b/lib/DBM/Deep/Array.pm index 4b8a2cc..247d730 100644 --- a/lib/DBM/Deep/Array.pm +++ b/lib/DBM/Deep/Array.pm @@ -394,6 +394,18 @@ sub _copy_node { return 1; } +sub _clear { + my $self = shift; + + my $size = $self->FETCHSIZE; + for my $key ( 0 .. $size - 1 ) { + $self->_engine->delete_key( $self, $key, $key ); + } + $self->STORESIZE( 0 ); + + return; +} + sub length { (shift)->FETCHSIZE(@_) } sub pop { (shift)->POP(@_) } sub push { (shift)->PUSH(@_) }