From b8a6ec28c559aab56302d5dfdff042dc6a3a8f07 Mon Sep 17 00:00:00 2001 From: bernhard Date: Sat, 18 Feb 2023 18:22:06 +0100 Subject: [PATCH] Issue #2177: TidyAll::Plugin::OTOBO::Perl::Dumper is gone replaced by the Perl::Critic policy Modules::ProhibitEvilModules --- Kernel/Modules/AdminProcessManagement.pm | 6 ++---- Kernel/System/Log.pm | 3 +-- Kernel/System/Main.pm | 3 +-- Kernel/System/MigrateFromOTRS/Base.pm | 3 +-- bin/psgi-bin/otobo.psgi | 3 +-- development/webservices/otobo.RESTRequest.pl | 4 +--- development/webservices/otobo.SOAPRequest.pl | 4 +--- scripts/test/XML.t | 6 ------ 8 files changed, 8 insertions(+), 24 deletions(-) diff --git a/Kernel/Modules/AdminProcessManagement.pm b/Kernel/Modules/AdminProcessManagement.pm index eeff1ae206..08eac917c4 100644 --- a/Kernel/Modules/AdminProcessManagement.pm +++ b/Kernel/Modules/AdminProcessManagement.pm @@ -16,15 +16,13 @@ package Kernel::Modules::AdminProcessManagement; -## nofilter(TidyAll::Plugin::OTOBO::Perl::Dumper) - +use v5.24; use strict; use warnings; -use v5.24; use utf8; # core modules -use Data::Dumper; +use Data::Dumper; ## no critic qw(Modules::ProhibitEvilModules) # CPAN modules diff --git a/Kernel/System/Log.pm b/Kernel/System/Log.pm index 7e764769dc..781b21d395 100644 --- a/Kernel/System/Log.pm +++ b/Kernel/System/Log.pm @@ -18,7 +18,6 @@ package Kernel::System::Log; ## nofilter(TidyAll::Plugin::OTOBO::Perl::PODSpelling) ## nofilter(TidyAll::Plugin::OTOBO::Perl::Time) -## nofilter(TidyAll::Plugin::OTOBO::Perl::Dumper) ## nofilter(TidyAll::Plugin::OTOBO::Perl::Require) ## nofilter(TidyAll::Plugin::OTOBO::Perl::ParamObject) @@ -417,7 +416,7 @@ dump a perl variable to log sub Dumper { my ( $Self, @Data ) = @_; - require Data::Dumper; + require Data::Dumper; ## no critic qw(Modules::ProhibitEvilModules) # returns the context of the current subroutine and sub-subroutine! my ( $Package1, $Filename1, $Line1, $Subroutine1 ) = caller(0); diff --git a/Kernel/System/Main.pm b/Kernel/System/Main.pm index f8434bef1b..5d3efb36de 100644 --- a/Kernel/System/Main.pm +++ b/Kernel/System/Main.pm @@ -15,7 +15,6 @@ # -- package Kernel::System::Main; -## nofilter(TidyAll::Plugin::OTOBO::Perl::Dumper) ## nofilter(TidyAll::Plugin::OTOBO::Perl::Require) use strict; @@ -23,7 +22,7 @@ use warnings; # core modules use Digest::MD5 qw(md5_hex); -use Data::Dumper; +use Data::Dumper; ## no critic qw(Modules::ProhibitEvilModules) use File::stat; use Unicode::Normalize; use List::Util qw(first); diff --git a/Kernel/System/MigrateFromOTRS/Base.pm b/Kernel/System/MigrateFromOTRS/Base.pm index 9f90b7a502..3a801a0649 100644 --- a/Kernel/System/MigrateFromOTRS/Base.pm +++ b/Kernel/System/MigrateFromOTRS/Base.pm @@ -15,7 +15,6 @@ # -- package Kernel::System::MigrateFromOTRS::Base; -## nofilter(TidyAll::Plugin::OTOBO::Perl::Dumper) ## nofilter(TidyAll::Plugin::OTOBO::Common::CustomizationMarkers) use strict; @@ -26,7 +25,7 @@ use utf8; # core modules use List::Util qw(first); -use Data::Dumper; +use Data::Dumper; ## no critic qw(Modules::ProhibitEvilModules) use File::Basename qw(basename dirname fileparse); use File::Copy qw(move); use File::Path qw(make_path); diff --git a/bin/psgi-bin/otobo.psgi b/bin/psgi-bin/otobo.psgi index c5c1f9458e..0b0f03e2a7 100755 --- a/bin/psgi-bin/otobo.psgi +++ b/bin/psgi-bin/otobo.psgi @@ -72,14 +72,13 @@ use lib "$Bin/../.."; use lib "$Bin/../../Kernel/cpan-lib"; use lib "$Bin/../../Custom"; -## nofilter(TidyAll::Plugin::OTOBO::Perl::Dumper) ## nofilter(TidyAll::Plugin::OTOBO::Perl::Require) ## nofilter(TidyAll::Plugin::OTOBO::Perl::SyntaxCheck) ## nofilter(TidyAll::Plugin::OTOBO::Perl::Time) # core modules use Cwd qw(abs_path); -use Data::Dumper; +use Data::Dumper; ## no critic qw(Modules::ProhibitEvilModules) use Encode qw(:all); use File::Basename qw(dirname); use File::Path qw(make_path); diff --git a/development/webservices/otobo.RESTRequest.pl b/development/webservices/otobo.RESTRequest.pl index 7c7e1faf56..2bd217a928 100755 --- a/development/webservices/otobo.RESTRequest.pl +++ b/development/webservices/otobo.RESTRequest.pl @@ -19,8 +19,6 @@ use warnings; use utf8; -## nofilter(TidyAll::Plugin::OTOBO::Perl::Dumper) - # use ../ as lib location use File::Basename; use FindBin qw($RealBin); @@ -28,7 +26,7 @@ use JSON; use REST::Client; -use Data::Dumper; +use Data::Dumper; ## no critic qw(Modules::ProhibitEvilModules) # This is the HOST for the web service the format is: # ::///nph-genericinterface.pl diff --git a/development/webservices/otobo.SOAPRequest.pl b/development/webservices/otobo.SOAPRequest.pl index 2ad49a1cce..c8f3142e74 100755 --- a/development/webservices/otobo.SOAPRequest.pl +++ b/development/webservices/otobo.SOAPRequest.pl @@ -18,15 +18,13 @@ use strict; use warnings; -## nofilter(TidyAll::Plugin::OTOBO::Perl::Dumper) - # use ../ as lib location use File::Basename; use FindBin qw($RealBin); use lib dirname($RealBin); use SOAP::Lite; -use Data::Dumper; +use Data::Dumper; ## no critic qw(Modules::ProhibitEvilModules) # Variables to be defined diff --git a/scripts/test/XML.t b/scripts/test/XML.t index 7d9d180792..769ca94ae7 100644 --- a/scripts/test/XML.t +++ b/scripts/test/XML.t @@ -20,7 +20,6 @@ use warnings; use utf8; # core modules -use Data::Dumper; # CPAN modules use Test2::V0; @@ -75,7 +74,6 @@ END_XML my @XMLHash = $XMLObject->XMLParse2XMLHash( String => $String ); - #diag Dumper( \@XMLHash ); my @ExpectedXMLHash = ( undef, { @@ -195,8 +193,6 @@ END_XML # the method MLHash2D() changes the passed in XMLHash as a side effect my %ValueHash = $XMLObject->XMLHash2D( XMLHash => \@XMLHash ); - #diag Dumper( \@XMLHash, \%ValueHash ); - my @ExpectedChangedXMLHash = ( undef, { @@ -1201,8 +1197,6 @@ else { my $XML = ''; my @XMLARRAY = $XMLObject->XMLParse( String => $XML ); - #diag Dumper($XML, \@XMLARRAY); - # make a copy of the XMLArray (deep clone it), # it will be needed for a later comparison my @XMLARRAYCopy = $StorableObject->Clone( Data => \@XMLARRAY )->@*;