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

use explicit variable names

parent 5e07634c
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ package IdPAccountManager::SAMLMetadata;
use strict;
use warnings;
use English qw(-no_match_vars);
use IdPAccountManager::Tools;
use IdPAccountManager::Logger;
......@@ -45,7 +46,7 @@ sub load {
$self->{logger}->log(
level => LOG_ERROR,
message =>
"Failed to read $in{'federation_metadata_file_path'} : $!"
"Failed to read $in{'federation_metadata_file_path'} : $ERRNO"
);
return undef;
}
......@@ -55,7 +56,7 @@ sub load {
{
$self->{logger}->log(
level => LOG_ERROR,
message => "Failed to parse file $in{'metadata_file'} : $!"
message => "Failed to parse file $in{'metadata_file'} : $ERRNO"
);
return undef;
}
......@@ -122,7 +123,7 @@ sub _get_xml_object {
unless (-f $metadata_file) {
$self->{logger}->log(
level => LOG_ERROR,
message => "File $metadata_file not found: $!"
message => "File $metadata_file not found: $ERRNO"
);
return undef;
}
......@@ -130,7 +131,7 @@ sub _get_xml_object {
unless (open FH, $metadata_file) {
$self->{logger}->log(
level => LOG_ERROR,
message => "Failed to open file $metadata_file: $!"
message => "Failed to open file $metadata_file: $ERRNO"
);
return undef;
}
......@@ -149,10 +150,10 @@ sub _get_xml_object {
## Eval() prevents the parsing from killing the main process
eval { $doc = $parser->parse_fh(\*FH) };
if ($@) {
if ($EVAL_ERROR) {
$self->{logger}->log(
level => LOG_ERROR,
message => "Failed to parse file $metadata_file : $@"
message => "Failed to parse file $metadata_file : $EVAL_ERROR"
);
return undef;
}
......@@ -160,7 +161,7 @@ sub _get_xml_object {
unless ($doc) {
$self->{logger}->log(
level => LOG_ERROR,
message => "Failed to parse file $metadata_file : $!"
message => "Failed to parse file $metadata_file : $ERRNO"
);
return undef;
}
......
......@@ -3,6 +3,7 @@ package IdPAccountManager::WebRequest;
use strict;
use warnings;
use English qw(-no_match_vars);
use IdPAccountManager::Logger;
use Conf;
......@@ -221,7 +222,7 @@ sub req_account_wizard {
push @{ $self->{'param_out'}{'errors'} }, "internal";
$self->{logger}->log(
level => LOG_ERROR,
message => "Failed to load federation metadata : $!"
message => "Failed to load federation metadata : $ERRNO"
);
return undef;
}
......@@ -230,7 +231,7 @@ sub req_account_wizard {
push @{ $self->{'param_out'}{'errors'} }, "internal";
$self->{logger}->log(
level => LOG_ERROR,
message => "Failed to parse federation metadata : $!"
message => "Failed to parse federation metadata : $ERRNO"
);
return undef;
}
......@@ -268,7 +269,7 @@ sub req_select_sp {
push @{ $self->{'param_out'}{'errors'} }, "internal";
$self->{logger}->log(
level => LOG_ERROR,
message => "Failed to load federation metadata : $!"
message => "Failed to load federation metadata : $ERRNO"
);
return undef;
}
......@@ -282,7 +283,7 @@ sub req_select_sp {
push @{ $self->{'param_out'}{'errors'} }, "internal";
$self->{logger}->log(
level => LOG_ERROR,
message => "Failed to parse federation metadata : $!"
message => "Failed to parse federation metadata : $ERRNO"
);
return undef;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment