diff options
author | Russ Allbery <eagle@eyrie.org> | 2015-12-14 21:54:13 -0800 |
---|---|---|
committer | Russ Allbery <eagle@eyrie.org> | 2015-12-14 21:54:13 -0800 |
commit | b0d5c2d20c19ba4f4274a260660c98757ba07644 (patch) | |
tree | ed2a02e79d6026bdb09e999da433033c0492bee5 /perl/lib/Wallet/Object/Base.pm | |
parent | 6b7b9a29d20a65712061648404bbc6f1be5cacee (diff) | |
parent | 6b0cad572edef05d119abc8fc843c8c5d33665b8 (diff) |
Merge pull request #2 from jonrober/master
Changes so far for 1.3
Diffstat (limited to 'perl/lib/Wallet/Object/Base.pm')
-rw-r--r-- | perl/lib/Wallet/Object/Base.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/perl/lib/Wallet/Object/Base.pm b/perl/lib/Wallet/Object/Base.pm index bdd61fb..97e6127 100644 --- a/perl/lib/Wallet/Object/Base.pm +++ b/perl/lib/Wallet/Object/Base.pm @@ -609,6 +609,15 @@ sub history { # The get methods must always be overridden by the subclass. sub get { die "Do not instantiate Wallet::Object::Base directly\n"; } +# The update method should only work if a subclass supports it as something +# different from get. That makes it explicit about whether the subclass has +# a meaningful update. +sub update { + my ($self) = @_; + $self->error ("update is not supported for this type, use get instead"); + return; +} + # Provide a default store implementation that returns an immutable object # error so that auto-generated types don't have to provide their own. sub store { |