From 045b33feeb6666644a34ac419cce1b587c6a90cc Mon Sep 17 00:00:00 2001
From: Guillaume Rousse <guillaume.rousse@renater.fr>
Date: Fri, 3 Nov 2017 11:33:49 +0100
Subject: [PATCH] cleanup imported modules list

---
 bin/account-manager-client.pl         | 6 +++---
 bin/account-manager-web.pl            | 8 --------
 lib/IdPAccountManager/SAMLMetadata.pm | 4 ++--
 lib/IdPAccountManager/Tools.pm        | 7 ++-----
 lib/IdPAccountManager/WebRequest.pm   | 7 ++++++-
 5 files changed, 13 insertions(+), 19 deletions(-)

diff --git a/bin/account-manager-client.pl b/bin/account-manager-client.pl
index 86ba336..bb68573 100755
--- a/bin/account-manager-client.pl
+++ b/bin/account-manager-client.pl
@@ -20,13 +20,13 @@ use Pod::Usage;
 use Conf;
 use IdPAccountManager::Data::AuthenticationToken;
 use IdPAccountManager::Data::AuthenticationToken::Manager;
-use IdPAccountManager::Data::TestAccount;
-use IdPAccountManager::Data::TestAccount::Manager;
 use IdPAccountManager::Data::ServiceProvider;
 use IdPAccountManager::Data::ServiceProvider::Manager;
-use IdPAccountManager::SAMLMetadata;
+use IdPAccountManager::Data::TestAccount;
+use IdPAccountManager::Data::TestAccount::Manager;
 use IdPAccountManager::Configuration;
 use IdPAccountManager::Logger;
+use IdPAccountManager::SAMLMetadata;
 
 my %options;
 GetOptions(
diff --git a/bin/account-manager-web.pl b/bin/account-manager-web.pl
index e78662e..dcf73ec 100755
--- a/bin/account-manager-web.pl
+++ b/bin/account-manager-web.pl
@@ -12,14 +12,6 @@ use warnings;
 use utf8;
 use lib qw(lib conf);
 
-use CGI;
-use CGI::Cookie;
-use CGI::Util;
-use Template;
-use Template::Constants qw( :debug );
-
-use IdPAccountManager::SAMLMetadata;
-
 use IdPAccountManager::Configuration;
 use IdPAccountManager::WebRequest;
 
diff --git a/lib/IdPAccountManager/SAMLMetadata.pm b/lib/IdPAccountManager/SAMLMetadata.pm
index 7d4acf7..204d90d 100644
--- a/lib/IdPAccountManager/SAMLMetadata.pm
+++ b/lib/IdPAccountManager/SAMLMetadata.pm
@@ -8,11 +8,11 @@ use strict;
 use warnings;
 
 use English qw(-no_match_vars);
+use XML::LibXML;
+
 use IdPAccountManager::Tools;
 use IdPAccountManager::Logger;
 
-use XML::LibXML;
-
 sub new {
     my ($pkg, %args) = @_;
 
diff --git a/lib/IdPAccountManager/Tools.pm b/lib/IdPAccountManager/Tools.pm
index cb76b27..447f376 100644
--- a/lib/IdPAccountManager/Tools.pm
+++ b/lib/IdPAccountManager/Tools.pm
@@ -4,13 +4,10 @@ package IdPAccountManager::Tools;
 ## This software was developed by RENATER. The research leading to these results has received funding
 ## from the European Community¹s Seventh Framework Programme (FP7/2007-2013) under grant agreement nº 238875 (GÉANT).
 
-use Template;
-
-# load Template::Stash to make method tables visible
-use Template::Stash;
-
 use Digest::SHA;
 use Encode;
+use Template;
+use Template::Stash;
 
 INIT {
     ## a TT2 virtual method to get a variable type
diff --git a/lib/IdPAccountManager/WebRequest.pm b/lib/IdPAccountManager/WebRequest.pm
index 07e5ac4..c0cdf03 100755
--- a/lib/IdPAccountManager/WebRequest.pm
+++ b/lib/IdPAccountManager/WebRequest.pm
@@ -3,11 +3,16 @@ package IdPAccountManager::WebRequest;
 use strict;
 use warnings;
 
+use CGI;
+use CGI::Cookie;
 use English qw(-no_match_vars);
-use IdPAccountManager::Logger;
+use Template;
+
 use IdPAccountManager::Data::TestAccount;
 use IdPAccountManager::Data::AuthenticationToken;
 use IdPAccountManager::Data::ServiceProvider;
+use IdPAccountManager::Logger;
+use IdPAccountManager::SAMLMetadata;
 
 ## New web request
 sub new {
-- 
GitLab