From 11dc704a577ee9f0e543304395612e4436df5d3d Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Mon, 9 Jan 2017 15:43:30 +0000 Subject: [PATCH] Optimize (#595) --- .../lib/Lemonldap/NG/Common/FormEncode.pm | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/FormEncode.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/FormEncode.pm index 7b2ae60bc..4e126964f 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/FormEncode.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/FormEncode.pm @@ -16,18 +16,13 @@ BEGIN { eval <<'EOT'; sub build_urlencoded { my(%h)=@_; - my $v; - return join('&',map {$v=URI::Escape::uri_escape($h{$_});"$_=$v"} keys %h); + return join('&',map {my $v=URI::Escape::uri_escape($h{$_});"$_=$v"} keys %h); } EOT } else { require WWW::Form::UrlEncoded; - eval <<'EOT'; -sub build_urlencoded { - return WWW::Form::UrlEncoded::build_urlencoded(@_); -} -EOT + *build_urlencoded = \&WWW::Form::UrlEncoded::build_urlencoded; } }