Skip to content

Commit

Permalink
remove redundunt xml read
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Aug 15, 2016
1 parent 73a0e45 commit 6da59d3
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions driver_cpl/bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6da59d3

Please sign in to comment.