From 0837b2e78a283d27a288ca3bfe49490f940a77b9 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Thu, 20 Sep 2007 00:38:23 +0000 Subject: Update the documentation to get rid of the stupid error return from attr and instead tell the caller to call error() on an empty return to see if there was a problem. --- docs/design-api | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/design-api b/docs/design-api index 6e483b9..c0af5d5 100644 --- a/docs/design-api +++ b/docs/design-api @@ -32,8 +32,10 @@ Object API backend has custom attributes, you will need to override this method. If no other arguments besides ATTRIBUTE are given, returns the values - of that attribute, if any, as a list. On error, returns a list - containing one undefined element; (undef), in other words. + of that attribute, if any, as a list. To distinguish between the + empty attribute list and an error, be sure to undefine $self->{error} + at the start of the method and only set the error on failure so that + the caller can call error() to determine if there was a a failure. If other arguments are given, sets the given ATTRIBUTE values to VALUES, which must be a reference to an array (even if only one value -- cgit v1.2.3