Improve code (#1455)

lowercase-endpoints
Christophe Maudoux 5 years ago
parent 9858b94482
commit ab1601745b
  1. 10
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Tests.pm

@ -42,14 +42,8 @@ sub tests {
# Check if portal URL is well formated
portalURL => sub {
# Checking for ending slash
$conf->{portal} .= '/'
unless ( $conf->{portal} =~ qr#/$# );
# Deleting trailing ending slash
my $regex = qr#/+$#;
$conf->{portal} =~ s/$regex/\//;
# Append or remove trailing ending slashes
$conf->{portal} =~ s%/*$%/%;
return 1;
},

Loading…
Cancel
Save