From f7800e56447b0021c80b38b789e9d63fa91122b0 Mon Sep 17 00:00:00 2001 From: Christophe Maudoux Date: Sat, 19 Dec 2020 00:01:49 +0100 Subject: [PATCH] use strict --- .../lib/Lemonldap/NG/Common/Apache/Session/Store.pm | 4 +++- .../lib/Lemonldap/NG/Common/EmailTransport.pm | 3 ++- lemonldap-ng-common/lib/Lemonldap/NG/Common/IPv6.pm | 7 +++++-- lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm | 4 ++-- .../lib/Lemonldap/NG/Common/PSGI/Cli/Lib.pm | 3 ++- .../lib/Lemonldap/NG/Common/PSGI/Request.pm | 3 +-- lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm | 3 ++- .../lib/Lemonldap/NG/Common/PSGI/SOAPService.pm | 6 ++++-- lemonldap-ng-common/lib/Lemonldap/NG/Common/Session.pm | 5 +++-- lemonldap-ng-common/lib/Lemonldap/NG/Common/UserAgent.pm | 3 ++- lemonldap-ng-common/lib/Lemonldap/NG/Common/Util.pm | 5 ++--- lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI.pm | 4 ++-- 12 files changed, 30 insertions(+), 20 deletions(-) diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/Store.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/Store.pm index ad6812cc0..06ef10af8 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/Store.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/Store.pm @@ -1,7 +1,9 @@ package Lemonldap::NG::Common::Apache::Session::Store; -our $VERSION = '2.0.0'; +use strict; + +our $VERSION = '2.0.10'; sub new { my $class = shift; diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/EmailTransport.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/EmailTransport.pm index 7509e689d..1050a38c4 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/EmailTransport.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/EmailTransport.pm @@ -1,11 +1,12 @@ package Lemonldap::NG::Common::EmailTransport; +use strict; use Email::Sender::Transport::SMTP qw(); use MIME::Entity; use Email::Sender::Simple qw(sendmail); use Email::Date::Format qw(email_date); -our $VERSION = '2.0.9'; +our $VERSION = '2.0.10'; sub new { my ( $class, $conf ) = @_; diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/IPv6.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/IPv6.pm index 498fe01d7..ca47f4023 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/IPv6.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/IPv6.pm @@ -1,8 +1,10 @@ package Lemonldap::NG::Common::IPv6; +use strict; use base 'Exporter'; -@EXPORT = qw(&isIPv6 &net6 &expand6); +our $VERSION = '2.0.10'; +our @EXPORT = qw(&isIPv6 &net6 &expand6); sub isIPv6 { my ($ip) = @_; @@ -15,7 +17,7 @@ sub net6 { # Convert to binary my $b = join '', map { unpack( 'B*', pack( 'H*', $_ ) ) } split( ':', expand6($ip) ); - $net = substr $b, 0, $bits; + my $net = substr $b, 0, $bits; $net .= '0' x ( 128 - length($net) ); $net = unpack( 'H*', pack( 'B*', $net ) ); $net = join( ':', ( unpack "a4" x 8, $net ) ); @@ -24,6 +26,7 @@ sub net6 { } sub expand6 { + my @arr; my @_parts = ( $_[0] =~ /([0-9A-Fa-f]+)/g ); my $nparts = scalar @_parts; if ( $nparts != 8 ) { diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm index bbb722e1c..d8bd35e1c 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm @@ -1,12 +1,12 @@ package Lemonldap::NG::Common::PSGI; -use 5.10.0; +use strict; use Mouse; use JSON; use Lemonldap::NG::Common::PSGI::Constants; use Lemonldap::NG::Common::PSGI::Request; -our $VERSION = '2.0.9'; +our $VERSION = '2.0.10'; our $_json = JSON->new->allow_nonref; diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Cli/Lib.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Cli/Lib.pm index 8c2a4d8a2..e4682d49e 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Cli/Lib.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Cli/Lib.pm @@ -1,10 +1,11 @@ package Lemonldap::NG::Common::PSGI::Cli::Lib; +use strict; use JSON; use Mouse; use Lemonldap::NG::Common::PSGI; -our $VERSION = '2.0.8'; +our $VERSION = '2.0.10'; has iniFile => ( is => 'ro', isa => 'Str' ); diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Request.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Request.pm index d6be65a46..85cc4631f 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Request.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Request.pm @@ -1,13 +1,12 @@ package Lemonldap::NG::Common::PSGI::Request; use strict; -use 5.14.0; use Mouse; use JSON; use Plack::Request; use URI::Escape; -our $VERSION = '2.0.8'; +our $VERSION = '2.0.10'; our @ISA = ('Plack::Request'); diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm index b1e0655d9..e1a364a5c 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm @@ -1,10 +1,11 @@ package Lemonldap::NG::Common::PSGI::Router; +use strict; use Mouse; use Lemonldap::NG::Common::PSGI; use Lemonldap::NG::Common::PSGI::Constants; -our $VERSION = '2.0.8'; +our $VERSION = '2.0.10'; extends 'Lemonldap::NG::Common::PSGI'; diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/SOAPService.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/SOAPService.pm index d3f8ecda5..afa0fa4df 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/SOAPService.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/SOAPService.pm @@ -5,9 +5,11 @@ # SOAP wrapper used to restrict exported functions package Lemonldap::NG::Common::PSGI::SOAPService; +use strict; + require SOAP::Lite; -our $VERSION = '2.0.6'; +our $VERSION = '2.0.10'; ## @cmethod Lemonldap::NG::Common::PSGI::SOAPService new(object obj,string @func) # Constructor @@ -28,7 +30,7 @@ sub new { # @return data provided by the exported function sub AUTOLOAD { my $self = shift; - $AUTOLOAD =~ s/.*:://; + our $AUTOLOAD =~ s/.*:://; if ( grep { $_ eq $AUTOLOAD } @{ $self->{func} } ) { my $tmp = $self->{obj}->$AUTOLOAD( $self->{req}, @_ ); unless ( ref($tmp) and ref($tmp) =~ /^SOAP/ ) { diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Session.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Session.pm index 41fb8514f..83896b6ea 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Session.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Session.pm @@ -6,10 +6,11 @@ package Lemonldap::NG::Common::Session; -our $VERSION = '2.0.9'; - +use strict; use Lemonldap::NG::Common::Apache::Session; +our $VERSION = '2.0.10'; + # Workaround for another ModPerl/Mouse issue... BEGIN { require Mouse; diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/UserAgent.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/UserAgent.pm index 5a23ea67f..5baca41d3 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/UserAgent.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/UserAgent.pm @@ -1,8 +1,9 @@ package Lemonldap::NG::Common::UserAgent; +use strict; use LWP::UserAgent; -our $VERSION = '2.0.0'; +our $VERSION = '2.0.10'; sub new { my ( $class, $conf ) = @_; diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Util.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Util.pm index ab501ff6f..f916d8b9c 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Util.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Util.pm @@ -1,12 +1,11 @@ package Lemonldap::NG::Common::Util; require Exporter; +use strict; use Digest::MD5; use MIME::Base64 qw/encode_base64/; -use 5.10.0; - -our $VERSION = '2.0.9'; +our $VERSION = '2.0.10'; our @ISA = qw(Exporter); our @EXPORT_OK = qw(getSameSite getPSessionID genId2F); diff --git a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI.pm b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI.pm index c6034573e..1581bdb47 100644 --- a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI.pm +++ b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI.pm @@ -3,13 +3,13 @@ # See https://lemonldap-ng.org/documentation/latest/handlerarch package Lemonldap::NG::Handler::PSGI; -use 5.10.0; +use strict; use Mouse; use Lemonldap::NG::Handler::PSGI::Main; extends 'Lemonldap::NG::Handler::Lib::PSGI', 'Lemonldap::NG::Common::PSGI'; -our $VERSION = '2.0.3'; +our $VERSION = '2.0.10'; sub init { my ( $self, $args ) = @_;