Skip to content

Commit

Permalink
refact(Comic): state variable for better encapsulation
Browse files Browse the repository at this point in the history
  • Loading branch information
robertwenner committed Jul 10, 2024
1 parent e269de6 commit ed79ca2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Comic.pm
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ Reads a comic as an Inkscape SVG file and serves as a value object for the comic
# XPath default namespace name.
Readonly my $DEFAULT_NAMESPACE => 'defNs';

my %language_code_cache;


=head1 SUBROUTINES/METHODS
Expand Down Expand Up @@ -824,6 +822,8 @@ used in this Comic.
sub language_codes {
my ($self) = @_;

CORE::state %language_code_cache;

my %codes;
LANG: foreach my $lang ($self->languages()) {
if ($language_code_cache{$lang}) {
Expand Down

0 comments on commit ed79ca2

Please sign in to comment.