Skip to content

Commit

Permalink
Issue #2921: perlimports check for Kernel::System::DateTime
Browse files Browse the repository at this point in the history
  • Loading branch information
bschmalhofer committed Feb 3, 2024
1 parent 954d3bf commit 6bd15b6
Show file tree
Hide file tree
Showing 13 changed files with 50 additions and 23 deletions.
6 changes: 5 additions & 1 deletion Kernel/Modules/AgentTicketPrint.pm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ package Kernel::Modules::AgentTicketPrint;
use strict;
use warnings;

use Kernel::System::DateTime;
# core modules

# CPAN modules

# OTOBO modules
use Kernel::System::VariableCheck qw(IsHashRefWithData);
use Kernel::Language qw(Translatable);

Expand Down
7 changes: 6 additions & 1 deletion Kernel/Output/HTML/Dashboard/TicketStatsGeneric.pm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ package Kernel::Output::HTML::Dashboard::TicketStatsGeneric;
use strict;
use warnings;

use Kernel::System::DateTime qw(:all);
# core modules

# CPAN modules

# OTOBO modules
use Kernel::System::DateTime qw(OTOBOTimeZoneGet);

our $ObjectManagerDisabled = 1;

Expand Down
9 changes: 7 additions & 2 deletions Kernel/Output/HTML/Notification/AgentTimeZoneCheck.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ use parent 'Kernel::Output::HTML::Base';
use strict;
use warnings;

use Kernel::Language qw(Translatable);
use Kernel::System::DateTime;
# core modules

# CPAN modules

# OTOBO modules
use Kernel::Language qw(Translatable);
use Kernel::System::DateTime ();

our @ObjectDependencies = (
'Kernel::Config',
Expand Down
9 changes: 7 additions & 2 deletions Kernel/Output/HTML/Notification/CustomerUserTimeZoneCheck.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ use parent 'Kernel::Output::HTML::Base';
use strict;
use warnings;

use Kernel::Language qw(Translatable);
use Kernel::System::DateTime;
# core modules

# CPAN modules

# OTOBO modules
use Kernel::Language qw(Translatable);
use Kernel::System::DateTime ();

our @ObjectDependencies = (
'Kernel::Config',
Expand Down
9 changes: 7 additions & 2 deletions Kernel/Output/HTML/Preferences/TimeZone.pm
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ package Kernel::Output::HTML::Preferences::TimeZone;
use strict;
use warnings;

use Kernel::Language qw(Translatable);
use Kernel::System::DateTime;
# core modules

# CPAN modules

# OTOBO modules
use Kernel::Language qw(Translatable);
use Kernel::System::DateTime ();

our @ObjectDependencies = (
'Kernel::Config',
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Output/HTML/Statistics/View.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use warnings;

# OTOBO modules
use Kernel::System::VariableCheck qw(:all);
use Kernel::System::DateTime;
use Kernel::System::DateTime ();

our @ObjectDependencies = (
'Kernel::Config',
Expand Down
8 changes: 4 additions & 4 deletions Kernel/System/DateTime.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# --

package Kernel::System::DateTime;

## nofilter(TidyAll::Plugin::OTOBO::Perl::Time)
## nofilter(TidyAll::Plugin::OTOBO::Perl::Translatable)

use v5.24;
use strict;
Expand All @@ -40,9 +40,9 @@ use Scalar::Util qw(looks_like_number);
use List::Util qw(none);

# CPAN modules
use DateTime 1.08; # need 1.08 because Kernel::System::DateTime overrides _core_time()
use DateTime::TimeZone;
use DateTime::Locale;
use DateTime 1.08 (); # need 1.08 because Kernel::System::DateTime overrides _core_time()
use DateTime::TimeZone ();
use DateTime::Locale ();

# OTOBO modules
use Kernel::System::VariableCheck qw( IsArrayRefWithData IsHashRefWithData );
Expand Down
4 changes: 2 additions & 2 deletions Kernel/System/Log.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ use Carp ();
use Try::Tiny;

# CPAN modules
use DateTime 1.08;
use DateTime::Locale;
use DateTime 1.08 ();
use DateTime::Locale ();

# OTOBO modules

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ package Kernel::System::SupportDataCollector::Plugin::OTOBO::TimeSettings;
use strict;
use warnings;

use parent qw(Kernel::System::SupportDataCollector::PluginBase);

# core modules
use POSIX;

use parent qw(Kernel::System::SupportDataCollector::PluginBase);
# CPAN modules

# OTOBO modules
use Kernel::Language qw(Translatable);
use Kernel::System::DateTime;

our @ObjectDependencies = (
'Kernel::Config',
Expand Down
4 changes: 2 additions & 2 deletions Kernel/System/Web/InterfaceAgent.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ use Time::HiRes ();
# CPAN modules

# OTOBO modules
use Kernel::Language qw(Translatable);
use Kernel::System::DateTime;
use Kernel::Language qw(Translatable);
use Kernel::System::DateTime ();

our @ObjectDependencies = (
'Kernel::Config',
Expand Down
2 changes: 1 addition & 1 deletion Kernel/System/Web/InterfaceCustomer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use Time::HiRes ();
# OTOBO modules
use Kernel::System::VariableCheck qw(IsArrayRefWithData IsHashRefWithData);
use Kernel::Language qw(Translatable);
use Kernel::System::DateTime;
use Kernel::System::DateTime ();

our @ObjectDependencies = (
'Kernel::Config',
Expand Down
2 changes: 1 addition & 1 deletion bin/psgi-bin/otobo.psgi
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ use File::Basename qw(dirname);
use File::Path qw(make_path);

# CPAN modules
use DateTime 1.08;
use DateTime 1.08 (); ## no perlimports
use Template ();
use Plack::Builder;
use Plack::Request;
Expand Down
4 changes: 2 additions & 2 deletions scripts/test/DateTime.t
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ use utf8;
# core modules

# CPAN modules
use DateTime;
use DateTime ();
use Test2::V0;

# OTOBO modueles
use Kernel::System::UnitTest::RegisterOM; # Set up $Kernel::OM
use Kernel::System::DateTime;
use Kernel::System::DateTime ();

my $ConfigObject = $Kernel::OM->Get('Kernel::Config');

Expand Down

0 comments on commit 6bd15b6

Please sign in to comment.