Skip to content

Commit

Permalink
Stop inheriting from Exporter
Browse files Browse the repository at this point in the history
Instead just import the import sub which is the preferred modern way to set up Exporter now.
  • Loading branch information
JRaspass authored and rra committed Apr 3, 2024
1 parent 64f3d3b commit c6cb602
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/Term/ANSIColor.pm
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,11 @@ use warnings;

# Also uses Carp but loads it on demand to reduce memory usage.

use Exporter;

# use Exporter plus @ISA instead of use base to reduce memory usage.
## no critic (ClassHierarchies::ProhibitExplicitISA)
use Exporter qw(import);

# Declare variables that should be set in BEGIN for robustness.
## no critic (Modules::ProhibitAutomaticExportation)
our (@EXPORT, @EXPORT_OK, %EXPORT_TAGS, @ISA);
our (@EXPORT, @EXPORT_OK, %EXPORT_TAGS);

# We use autoloading, which sets this variable to the name of the called sub.
our $AUTOLOAD;
Expand Down Expand Up @@ -69,7 +66,6 @@ BEGIN {
}

# Exported symbol configuration.
@ISA = qw(Exporter);
@EXPORT = qw(color colored);
@EXPORT_OK = qw(uncolor colorstrip colorvalid coloralias);
%EXPORT_TAGS = (
Expand Down

0 comments on commit c6cb602

Please sign in to comment.