Let user be undef as per documentation

This commit is contained in:
Juerd Waalboer 2013-02-28 13:13:26 +01:00
parent a1f20e67ce
commit 7c3f43f18a

View file

@ -15,7 +15,6 @@ sub new {
sub add { sub add {
my ($self, $user, $amount, $description, $data) = @_; my ($self, $user, $amount, $description, $data) = @_;
$user ||= '$you';
$data ||= {}; $data ||= {};
my $item = { my $item = {
%$data, # Internal stuff, not logged or printed. %$data, # Internal stuff, not logged or printed.
@ -23,6 +22,7 @@ sub add {
description => $description, description => $description,
}; };
RevBank::Plugins::call_hooks("add", $self, $user, $item); RevBank::Plugins::call_hooks("add", $self, $user, $item);
$user ||= '$you';
push @{ $self->{ $user } }, $item; push @{ $self->{ $user } }, $item;
} }