From 6da59d32f7e1e9164cf8eb9b729bd8ed23db2730 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Mon, 15 Aug 2016 08:26:34 -0600 Subject: [PATCH] remove redundunt xml read --- driver_cpl/bld/build-namelist | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/driver_cpl/bld/build-namelist b/driver_cpl/bld/build-namelist index 34b214f59a0..687803a78c5 100755 --- a/driver_cpl/bld/build-namelist +++ b/driver_cpl/bld/build-namelist @@ -276,25 +276,13 @@ if (defined $opts{'infile'}) { $nl->merge_nl($nl_infile_valid); } +unshift @INC, "${CIMEROOT}/utils/perl5lib"; +require Config::SetupTools; + #----------------------------------------------------------------------------------------------- # Determine xml variables #----------------------------------------------------------------------------------------------- -my %xmlvars = (); -my @files = <${CASEROOT}/*xml>; -foreach my $file (@files) { - my $xml = XML::Lite->new( "$file" ); - my @e = $xml->elements_by_name('entry'); - while ( my $e = shift @e ) { - my %a = $e->get_attributes(); - my $val = $a{value}; - $xmlvars{$a{'id'}} = $a{'value'}; - } -} - -unshift @INC, "${CIMEROOT}/utils/perl5lib"; -require Config::SetupTools; - my %xmlvars = (); SetupTools::getxmlvars($CASEROOT, \%xmlvars); foreach my $attr (keys %xmlvars) {