diff options
author | Jannis M. Hoffmann <jannis.hoffmann@rwth-aachen.de> | 2022-05-09 22:57:17 +0200 |
---|---|---|
committer | Jannis M. Hoffmann <jannis.hoffmann@rwth-aachen.de> | 2022-05-09 22:57:17 +0200 |
commit | 6ed400461bb2429a5818c58a0a5b92f555700edc (patch) | |
tree | dd0138dd71462311c95dfdd1af4384efd1e66470 /lib/JWebmail/Controller | |
parent | 73503d87d3f9f87a73616bd3f4365906c87ae13e (diff) |
some small fixes by perlcritc
Diffstat (limited to 'lib/JWebmail/Controller')
-rw-r--r-- | lib/JWebmail/Controller/Webmail.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/JWebmail/Controller/Webmail.pm b/lib/JWebmail/Controller/Webmail.pm index c61c493..ce18de8 100644 --- a/lib/JWebmail/Controller/Webmail.pm +++ b/lib/JWebmail/Controller/Webmail.pm @@ -194,13 +194,14 @@ sub readmail { my $auth = $self->stash(ST_AUTH); my $mail; - eval { $mail = $self->users->show($auth, $mid) }; - if (my $err = $@) { + my $ok = eval { $mail = $self->users->show($auth, $mid); 1 }; + if (!$ok) { + my $err = $@; if ($err =~ m/unkown mail-id|no such message/) { $self->reply->not_found; return; } - die $@; + die; } # select a single body element |