From 0afc24fdc102776e5e1ac12c25f0e145932e1166 Mon Sep 17 00:00:00 2001
From: "Jannis M. Hoffmann" <jannis.hoffmann@rwth-aachen.de>
Date: Tue, 3 May 2022 18:41:21 +0200
Subject: 'die' propagates automatically if empty

---
 lib/JWebmail/Model/ReadMails/Role.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'lib')

diff --git a/lib/JWebmail/Model/ReadMails/Role.pm b/lib/JWebmail/Model/ReadMails/Role.pm
index 3af73ed..d6472a1 100644
--- a/lib/JWebmail/Model/ReadMails/Role.pm
+++ b/lib/JWebmail/Model/ReadMails/Role.pm
@@ -55,7 +55,7 @@ around @methods => sub {
     my @res;
     my $succ = eval { @res = $orig->(@_); 1 };
     $_[1]->{password} = $safe;
-    die $@ unless $succ;
+    die unless $succ;
     return wantarray ? @res : $res[$#res];
 };
 
-- 
cgit v1.2.3