diff --git a/README.md b/README.md index 1ff9496..2ce1dc5 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,51 @@ revbank - Banking for hackerspace visitors # ANNOUNCEMENTS +The following features were removed: + +- plugins `nyan` and `game` + + Please remove these from your `revbank.plugins` configuration file. + +- creating new accounts with + + Use `adduser` instead. + +- Method `$cart->is_multi_user` +- Method `$cart->delete($user, $index)` + + Delete a specific entry, as returned by `$cart->entries`, instead. + The following will disappear in a future version: -## Deprecated: creating new accounts with `deposit` +## Hooks `add` and `added` -For a while now, there has been a dedicated plugin, `adduser` to create new -accounts. The old way of creating new accounts (unknown input after a -`deposit` command was assumed to be the name of the a account) did not allow -for any input validation and would cause trouble if a user name already -existed. +Use `add_entry` and `added_entry` instead, which gets a RevBank::Cart::Entry +object, instead. -Please add `adduser` to `revbank.plugins`. +Note that the new "entries", unlike old "items", can have a `quantity` other +than 1. + +## Method `$cart->add(undef, ...)` + +## Method `$cart->add($user, ...)` + +The `add` method now always creates an entry from the perspective of the +current user, and returns a RevBank::Cart::Entry object to which "contras" can +be added with `add_contra`. The contras can be used for counteracting a value +with an operation on another account. + +To upgrade a plugin that does a single `add` with `undef` as the first +argument, simply remove the `undef, `. When multiple items were added that +belong together, consider using `add_contra` for the subsequent lines; see the +`take` and `give` plugins for examples. + +## Method `$cart->select_items` + +Use `entries` instead, which takes the same kind of argument. Note that +entries work slightly differently: they can have a quantity and attached contra +entries. Attributes are now accessed through the `has_attribute` and +`attribute` methods, instead of directly manipulating the hash. # DESCRIPTION diff --git a/revbank b/revbank index a865d16..25b8817 100755 --- a/revbank +++ b/revbank @@ -256,17 +256,56 @@ revbank - Banking for hackerspace visitors =head1 ANNOUNCEMENTS +The following features were removed: + +=over + +=item * plugins C and C + +Please remove these from your C configuration file. + +=item * creating new accounts with + +Use C instead. + +=item * Method C<< $cart->is_multi_user >> + +=item * Method C<< $cart->delete($user, $index) >> + +Delete a specific entry, as returned by C<< $cart->entries >>, instead. + +=back + The following will disappear in a future version: -=head2 Deprecated: creating new accounts with C +=head2 Hooks C and C -For a while now, there has been a dedicated plugin, C to create new -accounts. The old way of creating new accounts (unknown input after a -C command was assumed to be the name of the a account) did not allow -for any input validation and would cause trouble if a user name already -existed. +Use C and C instead, which gets a RevBank::Cart::Entry +object, instead. -Please add C to C. +Note that the new "entries", unlike old "items", can have a C other +than 1. + +=head2 Method C<< $cart->add(undef, ...) >> + +=head2 Method C<< $cart->add($user, ...) >> + +The C method now always creates an entry from the perspective of the +current user, and returns a RevBank::Cart::Entry object to which "contras" can +be added with C. The contras can be used for counteracting a value +with an operation on another account. + +To upgrade a plugin that does a single C with C as the first +argument, simply remove the C. When multiple items were added that +belong together, consider using C for the subsequent lines; see the +C and C plugins for examples. + +=head2 Method C<< $cart->select_items >> + +Use C<< entries >> instead, which takes the same kind of argument. Note that +entries work slightly differently: they can have a quantity and attached contra +entries. Attributes are now accessed through the C and +C methods, instead of directly manipulating the hash. =head1 DESCRIPTION