From 3964c651553d910ac3e092b95932cb9896b3f4a3 Mon Sep 17 00:00:00 2001 From: Andreas Neiser Date: Thu, 24 Oct 2013 09:29:41 +0200 Subject: [PATCH] Making xml-db.pl bit more compatible with older PERL versions --- xml-db/xml-db.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.43.0