From: octo Date: Thu, 7 Apr 2005 19:40:40 +0000 (+0000) Subject: Added description for $data->keys () X-Git-Tag: Release-0.8.0~20^2~47 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=1dba71b203ceb19823a3c426e303969070db42d0;p=onis.git Added description for $data->keys () --- diff --git a/lib/Onis/Data/Persistent.pm b/lib/Onis/Data/Persistent.pm index 73df88f..7793594 100644 --- a/lib/Onis/Data/Persistent.pm +++ b/lib/Onis/Data/Persistent.pm @@ -93,6 +93,13 @@ creating the object using B. Returns the data associated with the given I<$name>/I<$key> pair or an empty list if no data has been stored under this tupel before.. +=item B<$data-Ekeys> (I<$name>, [I<$field>, ...]) + +Returns a list of all the keys defined for this name. 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. + =back =head1 INTERNALS @@ -122,11 +129,6 @@ Backend modules will probably read the entire data at startup and save everything at the end. Another strategy might be reading (at least trying to) an entry when it's first tried to B.. -Another problem might be if/when a module needs a list of keys. I think almost -all plugins need this.. I'll probably add a B method to which you can -tell which field to use for sorting.. That might make it a lot easier for -database-backends.. - =head1 AUTHOR Florian octo Forster, L. Any comments welcome as long as I