diff --git a/build/lemonldap-ng/debian/liblemonldap-ng-portal-perl.install b/build/lemonldap-ng/debian/liblemonldap-ng-portal-perl.install index e5300f7d8..cf7e917eb 100644 --- a/build/lemonldap-ng/debian/liblemonldap-ng-portal-perl.install +++ b/build/lemonldap-ng/debian/liblemonldap-ng-portal-perl.install @@ -1,4 +1,3 @@ -debian/tmp/etc/lemonldap-ng/apps-list* debian/tmp/usr/share/lemonldap-ng/bin/purgeCentralCache debian/tmp/usr/share/lemonldap-ng/portal-skins debian/tmp/usr/share/man/man3/Lemonldap::NG::Portal* diff --git a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/AuthBasic.pm b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/AuthBasic.pm index 3f5a05648..8286a1de9 100644 --- a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/AuthBasic.pm +++ b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/AuthBasic.pm @@ -38,7 +38,7 @@ BEGIN { # @return Apache constant sub run ($$) { my $class; - ( $class, $apacheRequest ) = @_; + ( $class, $apacheRequest ) = splice @_; if ( time() - $lastReload > $reloadTime ) { unless ( my $tmp = $class->testConf(1) == OK ) { $class->lmLog( "$class: No configuration found", 'error' ); diff --git a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/CDA.pm b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/CDA.pm index 3d3081ae8..6a242b4d9 100644 --- a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/CDA.pm +++ b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/CDA.pm @@ -19,6 +19,7 @@ use base qw(Lemonldap::NG::Handler::SharedConf); # @return Apache constant sub run ($$) { my $class; + ( $class, $apacheRequest ) = splice @_; $cda = 1; return $class->SUPER::run($apacheRequest); } diff --git a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/CGI.pm b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/CGI.pm index 9e78306c6..abebaaacb 100644 --- a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/CGI.pm +++ b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/CGI.pm @@ -35,7 +35,7 @@ sub new { unless Lemonldap::NG::Handler::_CGI->testConf() == OK; # Arguments - my @args = @_; + my @args = splice @_; if ( ref( $args[0] ) ) { %$self = ( %$self, %{ $args[0] } ); } @@ -143,7 +143,7 @@ sub user { # @param $group name of the Lemonldap::NG group to test # @return boolean : true if user is in this group sub group { - my ( $self, $group ) = @_; + my ( $self, $group ) = splice @_; return ( $datas->{groups} =~ /\b$group\b/ ); } @@ -203,7 +203,7 @@ sub lmLog { # @param $vhost Virtual Host to test # @return boolean : true if $vhost is available sub vhostAvailable { - my ( $self, $vhost ) = @_; + my ( $self, $vhost ) = splice @_; return defined( $defaultCondition->{$vhost} ); } @@ -212,7 +212,7 @@ sub vhostAvailable { # @param $uri URI string # @param $vhost Optional virtual host (default current virtual host) sub grant { - my ( $self, $uri, $vhost ) = @_; + my ( $self, $uri, $vhost ) = splice @_; $vhost ||= $ENV{SERVER_NAME}; $apacheRequest = Lemonldap::NG::Apache::Request->new( { diff --git a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Proxy.pm b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Proxy.pm index c256f35d5..a741f5ca6 100644 --- a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Proxy.pm +++ b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Proxy.pm @@ -56,7 +56,7 @@ $UA->requests_redirectable( [] ); # Called for Apache response (PerlResponseHandler). # @return Apache constant sub run($$) { - ( $class, $r ) = @_; + ( $class, $r ) = splice @_; my $url = $r->uri; $url .= "?" . $r->args if ( $r->args ); diff --git a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/SharedConf.pm b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/SharedConf.pm index c94fcff15..9a81a93f5 100644 --- a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/SharedConf.pm +++ b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/SharedConf.pm @@ -61,7 +61,7 @@ BEGIN { # init is overloaded to call only localInit. globalInit is called later. # @param $args hash containing parameters sub init($$) { - my ( $class, $args ) = @_; + my ( $class, $args ) = splice @_; # TODO reloadTime in defaultValuesInit ? $reloadTime = $args->{reloadTime} || 600; $class->localInit($args); @@ -72,7 +72,7 @@ sub init($$) { # @param $args hash containing parameters # @return boolean sub defaultValuesInit { - my ( $class, $args ) = @_; + my ( $class, $args ) = splice @_; # Local configuration overrides global configuration my %h = ( %$args, %$localConfig ); @@ -83,7 +83,7 @@ sub defaultValuesInit { # Load parameters and build the Lemonldap::NG::Common::Conf object. # @return boolean sub localInit { - my ( $class, $args ) = @_; + my ( $class, $args ) = splice @_; die( "$class : unable to build configuration : $Lemonldap::NG::Common::Conf::msg" ) @@ -118,7 +118,7 @@ sub localInit { # @param $r Apache2::RequestRec object # @return Apache constant sub run($$) { - my ( $class, $r ) = @_; + my ( $class, $r ) = splice @_; if ( time() - $lastReload > $reloadTime ) { unless ( my $tmp = $class->testConf(1) == OK ) { $class->lmLog( "$class: No configuration found", 'error' ); @@ -138,7 +138,7 @@ sub run($$) { # @param $local boolean # @return Apache constant sub testConf { - my ( $class, $local ) = @_; + my ( $class, $local ) = splice @_; my $conf = $lmConf->getConf( { local => $local } ); unless ( ref($conf) ) { $class->lmLog( @@ -163,7 +163,7 @@ sub testConf { # Local parameters have best precedence on configuration parameters. # @return Apache constant sub setConf { - my ( $class, $conf ) = @_; + my ( $class, $conf ) = splice @_; # Local configuration overrides global configuration $cfgNum = $conf->{cfgNum}; @@ -183,7 +183,7 @@ sub setConf { # @param $r current request # @return Apache constant (OK or SERVER_ERROR) sub refresh($$) { - my ( $class, $r ) = @_; + my ( $class, $r ) = splice @_; $class->lmLog( "$class: request for configuration reload", 'notice' ); $r->handler("perl-script"); if ( $class->testConf(0) == OK ) { diff --git a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm index 43e394b7f..e13251ec8 100644 --- a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm +++ b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm @@ -183,7 +183,7 @@ sub logout_mp2 : method { # @param $mess message to log # @param $level string (debug, info, warning or error) sub lmLog { - my ( $class, $mess, $level ) = @_; + my ( $class, $mess, $level ) = splice @_; die "Level is required" unless ($level); if ( MP() == 2 ) { Apache2::ServerRec->log->$level($mess); @@ -201,7 +201,7 @@ sub lmLog { # @param $r current request # @param $s string to use sub lmSetApacheUser { - my ( $class, $r, $s ) = @_; + my ( $class, $r, $s ) = splice @_; return unless ($s); if ( MP() == 2 ) { $r->user($s); @@ -216,7 +216,7 @@ sub lmSetApacheUser { # @param $str string # @return string sub regRemoteIp { - my ( $class, $str ) = @_; + my ( $class, $str ) = splice @_; if ( MP() == 2 ) { $str =~ s/\$datas->\{ip\}/\$apacheRequest->connection->remote_ip/g; } @@ -232,7 +232,7 @@ sub regRemoteIp { # @param $h Name of the header # @param $v Value of the header sub lmSetHeaderIn { - my ( $r, $h, $v ) = @_; + my ( $r, $h, $v ) = splice @_; if ( MP() == 2 ) { return $r->headers_in->set( $h => $v ); } @@ -247,7 +247,7 @@ sub lmSetHeaderIn { # @param $h Name of the header # @return Value of the header sub lmHeaderIn { - my ( $r, $h ) = @_; + my ( $r, $h ) = splice @_; if ( MP() == 2 ) { return $r->headers_in->{$h}; } @@ -262,7 +262,7 @@ sub lmHeaderIn { # @param $h Name of the header # @param $v Value of the header sub lmSetErrHeaderOut { - my ( $r, $h, $v ) = @_; + my ( $r, $h, $v ) = splice @_; if ( MP() == 2 ) { return $r->err_headers_out->set( $h => $v ); } @@ -277,7 +277,7 @@ sub lmSetErrHeaderOut { # @param $h Name of the header # @param $v Value of the header sub lmSetHeaderOut { - my ( $r, $h, $v ) = @_; + my ( $r, $h, $v ) = splice @_; if ( MP() == 2 ) { return $r->headers_out->set( $h => $v ); } @@ -292,7 +292,7 @@ sub lmSetHeaderOut { # @param $h Name of the header # @return Value of the header sub lmHeaderOut { - my ( $r, $h, $v ) = @_; + my ( $r, $h, $v ) = splice @_; if ( MP() == 2 ) { return $r->headers_out->{$h}; } @@ -391,7 +391,7 @@ sub init($$) { # (statusProcess()) in wanted and launch childInit(). # @param $args reference to the initialization hash sub localInit($$) { - my ( $class, $args ) = @_; + my ( $class, $args ) = splice @_; if ( $localStorage = $args->{localStorage} ) { $localStorageOptions = $args->{localStorageOptions}; $localStorageOptions->{namespace} ||= "lemonldap"; @@ -420,7 +420,7 @@ sub localInit($$) { # - cleanLocalStorage() after each requests # @return True sub childInit { - my ( $class, $args ) = @_; + my ( $class, $args ) = splice @_; return 1 if ($childInitDone); # We don't initialise local storage in the "init" subroutine because it can @@ -436,7 +436,7 @@ sub childInit { sub { return $class->initLocalStorage( $_[1], $_[0] ); } ); $s->push_handlers( PerlPostConfigHandler => sub { - my ( $c, $l, $t, $s ) = @_; + my ( $c, $l, $t, $s ) = splice @_; $s->add_version_component('Lemonldap::NG::Handler'); } ) unless ( $args->{hideSignature} ); @@ -499,7 +499,7 @@ sub globalInit { # - the list of the compiled functions (compiled with conditionSub()) # @param $args reference to the configuration hash sub locationRulesInit { - my ( $class, $args ) = @_; + my ( $class, $args ) = splice @_; $locationCount = 0; # Pre compilation : both regexp and conditions @@ -527,7 +527,7 @@ sub locationRulesInit { # locationRulesInit(). # @param $cond The boolean expression to use sub conditionSub { - my ( $class, $cond ) = @_; + my ( $class, $cond ) = splice @_; return sub { 1 } if ( $cond =~ /^accept$/i ); return sub { 0 } @@ -581,7 +581,7 @@ sub conditionSub { # Set default values for non-customized variables # @param $args reference to the configuration hash sub defaultValuesInit { - my ( $class, $args ) = @_; + my ( $class, $args ) = splice @_; # Other values $cookieName = $args->{cookieName} || $cookieName || 'lemonldap'; @@ -603,7 +603,7 @@ sub defaultValuesInit { # Verify that portal variable exists. Die unless # @param $args reference to the configuration hash sub portalInit { - my ( $class, $args ) = @_; + my ( $class, $args ) = splice @_; die("portal parameter required") unless ( $args->{portal} ); if ( $args->{portal} =~ /[\$\(&\|"']/ ) { my $portal = $class->conditionSub( $args->{portal} ); @@ -620,7 +620,7 @@ sub portalInit { # Initialize the Apache::Session::* module choosed to share user's variables. # @param $args reference to the configuration hash sub globalStorageInit { - my ( $class, $args ) = @_; + my ( $class, $args ) = splice @_; $globalStorage = $args->{globalStorage} or die "globalStorage required"; eval "use $globalStorage;"; die($@) if ($@); @@ -632,7 +632,7 @@ sub globalStorageInit { # headers into the HTTP request. # @param $args reference to the configuration hash sub forgeHeadersInit { - my ( $class, $args ) = @_; + my ( $class, $args ) = splice @_; # Creation of the subroutine who will generate headers my %tmp; @@ -663,7 +663,7 @@ sub forgeHeadersInit { # Prepare local cache (if not done before by Lemonldap::NG::Common::Conf) # @return Apache2::Const::DECLINED sub initLocalStorage { - my ( $class, $r ) = @_; + my ( $class, $r ) = splice @_; if ( $localStorage and not $refLocalStorage ) { eval "use $localStorage;\$refLocalStorage = new $localStorage(\$localStorageOptions);"; @@ -676,7 +676,7 @@ sub initLocalStorage { ## @imethod protected void postUrlInit() # Prepare methods to post form attributes sub postUrlInit { - my ( $class, $args ) = @_; + my ( $class, $args ) = splice @_; return unless ( $args->{post} ); eval 'use Apache2::Filter;use URI'; $transform = {}; @@ -750,7 +750,7 @@ qq{