From 64f1d42d91f16413c9ff0bd32435886bfef142a8 Mon Sep 17 00:00:00 2001
From: Guillaume Rousse <guillaume.rousse@renater.fr>
Date: Tue, 7 Nov 2017 09:28:05 +0100
Subject: [PATCH] enforce strictness

---
 lib/IdPAccountManager/Tools.pm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/IdPAccountManager/Tools.pm b/lib/IdPAccountManager/Tools.pm
index 089b76e..568e9ae 100644
--- a/lib/IdPAccountManager/Tools.pm
+++ b/lib/IdPAccountManager/Tools.pm
@@ -1,5 +1,8 @@
 package IdPAccountManager::Tools;
 
+use strict;
+use warnings;
+
 use Digest::SHA;
 use Encode;
 use Template;
@@ -145,7 +148,7 @@ sub mail_notice {
     }
 
     $logger->tracef(
-        sprintf('(template=%s, to=%s)', $in{template}, $mail_data->{to})
+        sprintf('(template=%s, to=%s)', $args{template}, $mail_data->{to})
     );
 
     open SENDMAIL,
@@ -154,7 +157,7 @@ sub mail_notice {
       . " $notice_email";
 
     my $tt2 = Template->new({
-        FILTERS      => { qencode => [ \qencode, 0 ] },
+        FILTERS      => { qencode => [ \&qencode, 0 ] },
         INCLUDE_PATH => $args{templates_dir}
     });
     unless ($tt2->process($tt2_file, $mail_data, \*SENDMAIL)) {
-- 
GitLab