- Fix some bugs in the XML config handling
[videosite.git] / videosite / Base.pm
index 5aa8eae..939e203 100644 (file)
@@ -37,6 +37,8 @@ sub mergeconfig {
     my $c = shift;
     my $o;
 
+    return $self->{'_CONFIG'} unless defined($c);
+
     foreach $o (keys(%{$c->{'option'}})) {
         if (exists($self->{'_CONFIG'}->{'option'}->{$o})) {
             $self->{'_CONFIG'}->{'option'}->{$o}->{'content'} = $c->{'option'}->{$o}->{'content'};
@@ -50,8 +52,7 @@ sub _prepare_parameters {
     my $self = shift;
     my $p;
 
-    $self->{'_CONFIG'} = { 'module' => $self->{'NAME'},
-                           'option' => {}};
+    $self->{'_CONFIG'} = {'option' => {}};
 
     foreach $p (keys(%{$self->{'_PARAMS'}})) {
         $self->{'_CONFIG'}->{'option'}->{$p}->{'content'} = $self->{'_PARAMS'}->{$p}->[0];