From: Marius Gavrilescu Date: Sun, 1 Mar 2015 12:23:25 +0000 (+0200) Subject: More croaks X-Git-Tag: 0.001~1 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=6af8d6cc7eb8ea2cc113199f54fcfbc02b53c35b;p=plack-middleware-auth-complex.git More croaks --- diff --git a/lib/Plack/Middleware/Auth/Complex.pm b/lib/Plack/Middleware/Auth/Complex.pm index 6ef8769..057bfd7 100644 --- a/lib/Plack/Middleware/Auth/Complex.pm +++ b/lib/Plack/Middleware/Auth/Complex.pm @@ -59,12 +59,12 @@ sub init { sub create_user { my ($self, $parms) = @_; my %parms = $parms->flatten; - $self->{insert_sth}->execute($parms{username}, $self->hash_passphrase($parms{password}), $parms{email}) + $self->{insert_sth}->execute($parms{username}, $self->hash_passphrase($parms{password}), $parms{email}) or croak $self->{insert_sth}->errstr; } sub get_user { my ($self, $user) = @_; - $self->{select_sth}->execute($user) or croak $self->{sth}->errstr; + $self->{select_sth}->execute($user) or croak $self->{select_sth}->errstr; $self->{select_sth}->fetchrow_hashref } @@ -95,7 +95,7 @@ sub hash_passphrase { sub set_passphrase { my ($self, $username, $passphrase) = @_; - $self->{update_sth}->execute($self->hash_passphrase($passphrase), $username) + $self->{update_sth}->execute($self->hash_passphrase($passphrase), $username) or croak $self->{update_sth}->errstr; } sub make_reset_hmac {