diff options
author | Russ Allbery <rra@stanford.edu> | 2007-08-28 22:58:23 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2007-08-28 22:58:23 +0000 |
commit | ea9eb520f10ba59624326ef0776571a9bcbe4aa3 (patch) | |
tree | 25db83df125df67066de50659182d20d1846d9c1 /perl/Wallet/Object/Base.pm | |
parent | a64697ee9b64e9be5289a336b16cc50b45e7ad58 (diff) |
Add accessor functions for the name and type.
Diffstat (limited to 'perl/Wallet/Object/Base.pm')
-rw-r--r-- | perl/Wallet/Object/Base.pm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/perl/Wallet/Object/Base.pm b/perl/Wallet/Object/Base.pm index d50e513..0980aed 100644 --- a/perl/Wallet/Object/Base.pm +++ b/perl/Wallet/Object/Base.pm @@ -92,6 +92,18 @@ sub error { return $self->{error}; } +# Returns the type of the object. +sub type { + my ($self) = @_; + return $self->{type}; +} + +# Returns the name of the object. +sub name { + my ($self) = @_; + return $self->{name}; +} + # Record a global object action for this object. Takes the action (which must # be one of get or store), and the trace information: user, host, and time. # Returns true on success and false on failure, setting error appropriately. @@ -457,6 +469,10 @@ either the data of the object or undef on some error, using the provided arguments to update history information. The Wallet::Object::Base implementation just throws an exception. +=item name() + +Returns the object's name. + =item owner([OWNER, PRINCIPAL, HOSTNAME [, DATETIME]]) Sets or retrieves the owner of an object as a numeric ACL ID. If no @@ -482,6 +498,10 @@ by all backends (for instance, backends that automatically generate the data will not support this). The default implementation rejects all store() calls with an error message saying that the object is immutable. +=item type() + +Returns the object's type. + =back =head1 UTILITY METHODS |