Skip to content

Commit

Permalink
Merge pull request #8486 from ehuelsmann/cleanup/no-use-base
Browse files Browse the repository at this point in the history
Use 'parent' over 'base' module
  • Loading branch information
ehuelsmann authored Nov 10, 2024
2 parents 6856652 + 8f4fb50 commit d9f04ec
Show file tree
Hide file tree
Showing 16 changed files with 17 additions and 22 deletions.
9 changes: 2 additions & 7 deletions cpanfile
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ requires 'Text::CSV';
requires 'Text::Markdown';
requires 'URI';
requires 'URI::Escape';
requires 'Workflow::Action', '1.59';
requires 'Workflow::Condition', '1.59';
requires 'Workflow::Context', '1.59';
requires 'Workflow::Exception', '1.59';
Expand Down Expand Up @@ -186,13 +187,7 @@ on 'develop' => sub {
requires 'Selenium::Remote::Driver';
requires 'TAP::Parser::SourceHandler::pgTAP', '3.33';
requires 'Test::BDD::Cucumber', '0.86';
if ($ENV{CI}) {
# Required to suppress a variable re-definition
requires 'Test::Dependencies', '0.30';
}
else {
requires 'Test::Dependencies', '0.25';
}
requires 'Test::Dependencies', '0.34';
requires 'Test::Pod', '1.00';
requires 'Test::Pod::Coverage';
requires 'Test2::Harness';
Expand Down
2 changes: 1 addition & 1 deletion lib/LedgerSMB/Locale.pm
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ $myconfig->{dateformat}.
use strict;
use warnings;

use base qw( Locale::Maketext Exporter );
use parent qw( Locale::Maketext Exporter );
our @EXPORT_OK = qw(marktext);

use Locale::Maketext::Lexicon;
Expand Down
2 changes: 1 addition & 1 deletion lib/LedgerSMB/Magic.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package LedgerSMB::Magic;
use strict;
use warnings;

use base 'Exporter';
use parent 'Exporter';


our @EXPORT_OK = qw(
Expand Down
2 changes: 1 addition & 1 deletion lib/LedgerSMB/PGDate.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The type behaves internally as a Datetime module.

use v5.36.1;
use warnings;
use base qw(PGObject::Type::DateTime);
use parent qw(PGObject::Type::DateTime);

use Carp;
use DateTime;
Expand Down
2 changes: 1 addition & 1 deletion lib/LedgerSMB/PGNumber.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Math::BigFloat and can be used in this way.

use v5.36.1;
use warnings;
use base qw(PGObject::Type::BigFloat);
use parent qw(PGObject::Type::BigFloat);

# try using the GMP library for Math::BigFloat for speed
use Carp;
Expand Down
2 changes: 1 addition & 1 deletion lib/LedgerSMB/PGTimestamp.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The type behaves internally as a Datetime module.

use v5.36.1;
use warnings;
use base qw(PGObject::Type::DateTime);
use parent qw(PGObject::Type::DateTime);

use Carp;
use DateTime::Format::Strptime qw(strptime);
Expand Down
2 changes: 1 addition & 1 deletion lib/LedgerSMB/Workflow/Persister.pm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ the same configuration semantics.

use warnings;
use strict;
use base qw( Workflow::Persister::DBI );
use parent qw( Workflow::Persister::DBI );

use JSON::MaybeXS;
use Workflow::Context;
Expand Down
2 changes: 1 addition & 1 deletion lib/LedgerSMB/Workflow/Persister/Email.pm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The C< content > field will be loaded from the database when it's being accessed

use warnings;
use strict;
use base qw( LedgerSMB::Workflow::Persister::ExtraData );
use parent qw( LedgerSMB::Workflow::Persister::ExtraData );

use JSON::MaybeXS;
use Log::Any qw($log);
Expand Down
2 changes: 1 addition & 1 deletion lib/LedgerSMB/Workflow/Persister/ExtraData.pm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ C<LedgerSMB::App_State::DBH>.

use warnings;
use strict;
use base qw( Workflow::Persister::DBI::ExtraData );
use parent qw( Workflow::Persister::DBI::ExtraData );

use JSON::MaybeXS;
use Workflow::Context;
Expand Down
2 changes: 1 addition & 1 deletion lib/LedgerSMB/Workflow/Persister/Order.pm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ the same configuration semantics.

use warnings;
use strict;
use base qw( LedgerSMB::Workflow::Persister );
use parent qw( LedgerSMB::Workflow::Persister );

use Workflow::Exception qw( persist_error );
use English;
Expand Down
2 changes: 1 addition & 1 deletion old/lib/LedgerSMB/Batch.pm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ use strict;
use warnings;

use LedgerSMB::Setting;
use base qw(LedgerSMB::PGOld);
use parent qw(LedgerSMB::PGOld);

use Log::Any qw($log);

Expand Down
2 changes: 1 addition & 1 deletion old/lib/LedgerSMB/DBObject/Payment.pm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ see the included COPYRIGHT and LICENSE files for more information.
=cut

package LedgerSMB::DBObject::Payment;
use base qw(LedgerSMB::PGOld);
use parent qw(LedgerSMB::PGOld);
use strict;
use warnings;
use LedgerSMB::PGNumber;
Expand Down
2 changes: 1 addition & 1 deletion old/lib/LedgerSMB/DBObject/Reconciliation.pm
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ package LedgerSMB::DBObject::Reconciliation;
use strict;
use warnings;

use base qw(LedgerSMB::PGOld);
use parent qw(LedgerSMB::PGOld);
use List::Util qw(sum);
use LedgerSMB::PGNumber;

Expand Down
2 changes: 1 addition & 1 deletion old/lib/LedgerSMB/PGOld.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package LedgerSMB::PGOld;
use strict;
use warnings;

use base 'PGObject::Simple';
use parent 'PGObject::Simple';

=head1 METHODS
Expand Down
2 changes: 1 addition & 1 deletion old/lib/LedgerSMB/Setting.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package LedgerSMB::Setting;

use base qw(LedgerSMB::PGOld Exporter);
use parent qw(LedgerSMB::PGOld Exporter);
use strict;
use warnings;

Expand Down
2 changes: 1 addition & 1 deletion old/lib/LedgerSMB/old_code.pm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use POSIX 'SEEK_SET';
use Symbol;
use Feature::Compat::Try;

use base qw(Exporter);
use parent qw(Exporter);
our @EXPORT_OK = qw(dispatch);

# make sure the package exists after 'use'-ing this module:
Expand Down

0 comments on commit d9f04ec

Please sign in to comment.