--- deliantra/Deliantra/res2pm 2006/03/09 19:09:48 1.7 +++ deliantra/Deliantra/res2pm 2006/03/12 23:21:11 1.8 @@ -107,7 +107,7 @@ $arch->{value} = [$e->attr ("false"), $e->attr ("true")]; } - $sect->{$e->attr ("arch") || $e->attr("arch_begin")} = $arch; + push @$sect, [$e->attr ("arch") || $e->attr("arch_begin"), $arch]; } sub parse_type { @@ -121,7 +121,7 @@ $type->{required}{$i->attr ("arch")} = $i->attr ("value"); } } elsif ($e->name eq "attribute") { - parse_attr $e, $type->{attr} ||= {}; + parse_attr $e, $type->{attr} ||= []; } elsif ($e->name eq "ignore") { for my $i (grep ref, @{$e->contents}) { if ($i->name eq "ignore_list") { @@ -137,11 +137,11 @@ } elsif ($e->name eq "description") { $type->{desc} = string $e; } elsif ($e->name eq "section") { - my %attr; + my @attr; for my $i (grep ref, @{$e->contents}) { - parse_attr $i, \%attr; + parse_attr $i, \@attr; } - push @{ $type->{section} }, [$e->attr ("name") => \%attr]; + push @{ $type->{section} }, [$e->attr ("name") => \@attr]; } else { warn "unknown types subelement ", $e->name; }