From e6783f034c42f237183a2d48fb469ee079a23ac9 Mon Sep 17 00:00:00 2001 From: wickedOne Date: Wed, 21 Feb 2024 09:14:07 +0100 Subject: [PATCH] parse classmap - improved classmap processing - removed redundant file handle close --- lib/GPH/Composer.pm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/GPH/Composer.pm b/lib/GPH/Composer.pm index 1cd780d..5216dac 100755 --- a/lib/GPH/Composer.pm +++ b/lib/GPH/Composer.pm @@ -12,7 +12,7 @@ sub new { bless $self, $class; - $self->{classmap} = $self->parseClassMap($args{classmap}); + $self->parseClassMap($args{classmap}); return $self; } @@ -51,12 +51,8 @@ sub parseClassMap { next unless $line =~ /\$baseDir\s\./; my ($class, $code_path) = split(/ => \$baseDir \. /, $line); - $classmap{strip($class)} = strip($code_path); + $self->{classmap}{strip($class)} = strip($code_path); } - - close($fh); - - return (\%classmap); } sub strip {