Skip to content
Snippets Groups Projects
Commit eb1a677a authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

use UNIVERSAL::require for runtime modules loading

parent 7f42412f
Branches
Tags
No related merge requests found
...@@ -11,6 +11,7 @@ use Log::Any::Adapter; ...@@ -11,6 +11,7 @@ use Log::Any::Adapter;
use List::MoreUtils qw(uniq); use List::MoreUtils qw(uniq);
use Template; use Template;
use Template::Constants qw(:chomp); use Template::Constants qw(:chomp);
use UNIVERSAL::require;
use AccountManager::Account; use AccountManager::Account;
use AccountManager::Metadata; use AccountManager::Metadata;
...@@ -154,7 +155,7 @@ sub run { ...@@ -154,7 +155,7 @@ sub run {
my ($self) = @_; my ($self) = @_;
if ($self->{logger}->is_debug()) { if ($self->{logger}->is_debug()) {
require Data::Dump; Data::Dump->require();
my %parameters = $self->{cgi}->Vars(); my %parameters = $self->{cgi}->Vars();
$self->{logger}->debugf("input parameters: %s", Data::Dump::dump(\%parameters)); $self->{logger}->debugf("input parameters: %s", Data::Dump::dump(\%parameters));
} }
...@@ -460,8 +461,8 @@ sub req_complete_challenge { ...@@ -460,8 +461,8 @@ sub req_complete_challenge {
$tt2->process('send_authentication_token.tt2.html', $data, \$html_content); $tt2->process('send_authentication_token.tt2.html', $data, \$html_content);
# wrap in message # wrap in message
eval "require Email::MIME"; Email::MIME->require();
eval "require Email::Sender::Simple"; Email::Sender::Simple->require();
my $message = Email::MIME->create( my $message = Email::MIME->create(
header_str => [ header_str => [
...@@ -633,7 +634,7 @@ sub req_download_accounts { ...@@ -633,7 +634,7 @@ sub req_download_accounts {
-content_disposition => 'attachment; filename="accounts.csv"' -content_disposition => 'attachment; filename="accounts.csv"'
); );
eval "require Text::CSV"; Text::CSV->require();
my $csv = Text::CSV->new({ binary => 1, eol => "\r\n", quote_space => 0 }); my $csv = Text::CSV->new({ binary => 1, eol => "\r\n", quote_space => 0 });
$csv->print(\*STDOUT, [ qw/ $csv->print(\*STDOUT, [ qw/
username username
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment