From: Andreas Neiser Date: Thu, 24 Oct 2013 07:29:41 +0000 (+0200) Subject: Making xml-db.pl bit more compatible with older PERL versions X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=3964c651553d910ac3e092b95932cb9896b3f4a3;p=daqtools.git Making xml-db.pl bit more compatible with older PERL versions --- diff --git a/xml-db/xml-db.pl b/xml-db/xml-db.pl index 0523396..6fe5c67 100755 --- a/xml-db/xml-db.pl +++ b/xml-db/xml-db.pl @@ -11,7 +11,6 @@ use FindBin qw($RealBin); use Data::Dumper; use Storable qw(lock_store); - # some default config options # and provide nice help documentation # some global variables, needed everywhere @@ -175,9 +174,10 @@ sub MakeOrMergeDbItem { } # add all attributes - foreach my $a (keys %$n) { - next if $a eq 'name' or $a eq 'address'; - $dbitem->{$a} = $n->getAttribute($a); + foreach my $a ($n->attributes()) { + my $a_name = $a->getName(); + next if $a_name eq 'name' or $a_name eq 'address'; + $dbitem->{$a_name} = $a->getValue(); } # find required attributes from first ancestor which knows