| 2 |
## $Id$ |
## $Id$ |
| 3 |
## ---------------------------------------------------------------------- |
## ---------------------------------------------------------------------- |
| 4 |
## $Log$ |
## $Log$ |
| 5 |
|
## Revision 1.2 2003/02/20 20:15:45 joko |
| 6 |
|
## modified logging style |
| 7 |
|
## + property merging instead of dumb overriding |
| 8 |
|
## |
| 9 |
## Revision 1.1 2003/02/18 15:36:20 joko |
## Revision 1.1 2003/02/18 15:36:20 joko |
| 10 |
## + initial commit |
## + initial commit |
| 11 |
## |
## |
| 49 |
# FIXME |
# FIXME |
| 50 |
$file = "../$file"; |
$file = "../$file"; |
| 51 |
|
|
| 52 |
$self->log("Loading $file.", 'notice'); |
$self->log("Loading resource file '$file'.", 'info'); |
| 53 |
|
|
| 54 |
my $storage = Data::Storage::Handler::File->new( filename => $file ); |
my $storage = Data::Storage::Handler::File->new( filename => $file ); |
| 55 |
if (!$storage->exists()) { |
if (!$storage->exists()) { |
| 56 |
$self->log("File '$file' does not exist.", 'error'); |
$self->log("Resource not found: File '$file' does not exist.", 'error'); |
| 57 |
return; |
return; |
| 58 |
} |
} |
| 59 |
my $content = $storage->toString(); |
my $content = $storage->toString(); |
| 60 |
|
|
| 61 |
$self->load("/Data/Code/Scalar"); |
$self->load("/Data/Code/Scalar"); |
| 62 |
my $properties = $self->eval($content, $varnames); |
my $properties = $self->eval($content, $varnames); |
| 63 |
|
|
| 64 |
|
#print Dumper($self); |
| 65 |
|
|
| 66 |
$self->set_property($name, $properties); |
$self->merge_properties($name, $properties); |
| 67 |
|
|
| 68 |
|
#print Dumper($self); |
| 69 |
|
|
| 70 |
} |
} |
| 71 |
|
|
| 75 |
my $name = shift; |
my $name = shift; |
| 76 |
my $varnames = shift; |
my $varnames = shift; |
| 77 |
|
|
| 78 |
|
$self->log("Loading Perl Module '$module'.", 'info'); |
| 79 |
|
|
| 80 |
$self->load("/Data/Code/Module"); |
$self->load("/Data/Code/Module"); |
| 81 |
my $properties = $self->eval_vars($module, $varnames); |
my $properties = $self->eval_vars($module, $varnames); |
| 82 |
|
|
| 84 |
#print Dumper($properties); |
#print Dumper($properties); |
| 85 |
#exit; |
#exit; |
| 86 |
|
|
| 87 |
$self->set_property($name, $properties); |
$self->merge_properties($name, $properties); |
| 88 |
|
|
| 89 |
} |
} |
| 90 |
|
|