57 |
|
} |
58 |
|
$self->location($location."/".$name); |
59 |
|
|
60 |
– |
# --- make a new ActiveStore at the location and add it to the db list |
61 |
– |
my $ad=ActiveDoc::ActiveConfig->new($self->location()."/\.SCRAM"); |
60 |
|
|
61 |
|
# make a new store handler |
62 |
< |
my $parentconfig=$self->config; |
65 |
< |
$self->config(Configuration::ConfigureStore->new()); |
66 |
< |
$self->config()->db("local",$ad); |
67 |
< |
$self->config()->db("parent",$parentconfig); |
68 |
< |
$self->config()->policy("cache","local"); |
69 |
< |
$self->config()->basedoc($parentconfig->basedoc()); |
62 |
> |
my $parentconfig=$self->_setupstore(); |
63 |
|
|
64 |
|
# --- download everything first |
65 |
|
# FIX-ME --- cacheing is broken |
67 |
|
|
68 |
|
# --- and parse the setup file |
69 |
|
$self->parse("setup"); |
70 |
+ |
|
71 |
+ |
# --- store self in original database |
72 |
+ |
$parentconfig->store($self,"ConfigArea",$self->name(), |
73 |
+ |
$self->version()); |
74 |
+ |
} |
75 |
+ |
|
76 |
+ |
sub _setupstore { |
77 |
+ |
my $self=shift; |
78 |
+ |
|
79 |
+ |
# --- make a new ActiveStore at the location and add it to the db list |
80 |
+ |
my $ad=ActiveDoc::ActiveConfig->new($self->location()."/\.SCRAM"); |
81 |
+ |
|
82 |
+ |
my $parentconfig=$self->config(); |
83 |
+ |
$self->config(Configuration::ConfigureStore->new()); |
84 |
+ |
$self->config()->db("local",$ad); |
85 |
+ |
$self->config()->db("parent",$parentconfig); |
86 |
+ |
$self->config()->policy("cache","local"); |
87 |
+ |
$self->config()->basedoc($parentconfig->basedoc()); |
88 |
+ |
return $parentconfig; |
89 |
|
} |
90 |
|
|
91 |
|
sub store { |