Mmf. I don't really like "and return" style. I know it works, but using low-precedence `and` is just... unclear. I'd recommend instead,

```perl
my $error = sub {
    $self->{error} = $_[0];
    return undef;
}

return $error->("Unauthorized...") unless ...
```