aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Fripost/Panel/Login.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Fripost/Panel/Login.pm')
-rw-r--r--lib/Fripost/Panel/Login.pm14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/Fripost/Panel/Login.pm b/lib/Fripost/Panel/Login.pm
index 736207d..09520a4 100644
--- a/lib/Fripost/Panel/Login.pm
+++ b/lib/Fripost/Panel/Login.pm
@@ -12,7 +12,6 @@ Login.pm - Authentication subroutines for the Web Interface.
=cut
use parent 'CGI::Application';
-
use CGI::Application::Plugin::AutoRunmode;
use CGI::Application::Plugin::Session;
use CGI::Application::Plugin::Authentication;
@@ -21,10 +20,10 @@ use CGI::Application::Plugin::ConfigAuto 'cfg';
use Fripost::Schema;
use Fripost::Schema::Util 'split_addr';
+
use HTML::Entities 'encode_entities';
use URI::Escape::XS 'decodeURIComponent';
-use Net::IDN::Encode 'email_to_ascii';
-
+use Encode;
# This method is called right before the 'setup' method below. It
# initializes the session and authentication configurations.
@@ -143,7 +142,7 @@ sub login : Runmode {
$self->authen->logout if $self->authen->is_authenticated;
# Do not come back here on the next Run Mode
- $self->query->delete('a') if (defined $self->query->param('a')) and
+ $self->query->delete('a') if defined $self->query->param('a') and
$self->query->param('a') eq 'login';
# Where the users wants to go
@@ -178,8 +177,8 @@ sub logout : Runmode {
}
# Do not come back here on the next Run Mode
- $self->query->delete('a') if (defined $self->query->param('a')) and
- $self->query->param('a') eq 'logout';
+ $self->query->delete('a') if defined $self->query->param('a') and
+ $self->query->param('a') eq 'logout';
return $self->redirect( ($ENV{SCRIPT_NAME} // $self->query->url).'/' );
}
@@ -229,8 +228,7 @@ sub split_path {
$uri =~ s/^$script//s; # Strip the facing CGI script name
$uri =~ s/\?.*//s; # Strip the query
- map { decodeURIComponent($_); Encode::_utf8_on($_); $_ }
- (split /\//, $uri);
+ map { decodeURIComponent($_); Encode::_utf8_on($_); $_ } (split /\//, $uri);
}