From ad41998df33de65238b6c185bab62fa7ebe08d79 Mon Sep 17 00:00:00 2001 From: octo Date: Sun, 10 Apr 2005 16:31:22 +0000 Subject: [PATCH] Completed specification: Added ``del'' method. --- lib/Onis/Data/Persistent.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/Onis/Data/Persistent.pm b/lib/Onis/Data/Persistent.pm index 8c08f28..08d98ac 100644 --- a/lib/Onis/Data/Persistent.pm +++ b/lib/Onis/Data/Persistent.pm @@ -77,29 +77,33 @@ This is the constructor for the objects that will hold the data. Some modules may need a name for each field, and this is where plugins have to give the name of each field. This is particularly important for backends using relational databeses. I<$name> is merely a name for that variable or, in the database -world - a table. The name must be unique for each calling method's namespace. +world - a table. Since this is a constructor it returns an object. The object "knows" the folling methods: -=item B<$data-Eget> (I<$key>) +=item B<$obj-Eget> (I<$key>) Returns the data associated with the given I<$key> pair or an empty list if no data has been stored under this tupel before.. -=item B<$data-Eput> (I<$key>, I<@fields>) +=item B<$obj-Eput> (I<$key>, I<@fields>) Stores the given values in the data structure. How this is done is described below in L. Doesn't return anything. The number of entries in I<@fields> has to match the number of entries in I<@field_names> when creating the object using B. -=item B<$data-Ekeys> ([I<$field>, ...]) +=item B<$obj-Ekeys> ([I<$field>, ...]) Returns a list of all the keys defined for this object. If one field is given the list will be sorted by that field's values, if more fields are given the list is sorted with the first field taking precedence over the others. If no field is supplied the order is undefined. +=item B<$obj-Edel> (I<$key>) + +Deletes I<$key> and all fields associated with it. + =back =head1 INTERNALS -- 2.11.0