--- deliantra/server/lib/cf.pm 2006/08/27 15:24:22 1.48 +++ deliantra/server/lib/cf.pm 2006/08/27 17:59:26 1.49 @@ -358,7 +358,8 @@ for (@$data) { my ($name, $args) = @$_; - attach $obj, $name, %{$args || {} }; + + $obj->attach ($name, %{$args || {} }); } } @@ -369,7 +370,9 @@ @$registry = (); - for my $name (@{ $obj->{_attachment} }) { + delete $obj->{_attachment} unless @{ $obj->{_attachment} || [] }; + + for my $name (@{ $obj->{_attachment} || [] }) { if (my $attach = $attachment{$name}) { for (@$attach) { my ($klass, @attach) = @$_;