Kiss Gabor (Bitman)
2013-10-22 11:58:18 UTC
I wonder what is the concept of "preload node"
in case of "--default--" target.
File lib/ConfigTree/Node.pm, method parseLines():
my($node);
if ($token eq 'target') {
if ($name eq '--default--') {
if ($self->Done()) {
if (! $self->Preload()) {
$self->Debug("Making a preload node.");
$self->Preload(new ConfigTree::Node);
}
$node = $self->Preload();
$self->Debug("Using a preload node.");
} else {
$node = $self;
}
} else {
I can see that if the parser finds a second (third etc.)
"target --default--" stanza at the same level it passes the content
to the child node directly instead of normal inheritance mechanism.
But why?
Why --default-- targets are not simply merged?
(I want to mix manually maintained and machine generated config files
both containing "target --default--".)
Could somebody explain what was JRA's idea? :-)
Gabor
in case of "--default--" target.
File lib/ConfigTree/Node.pm, method parseLines():
my($node);
if ($token eq 'target') {
if ($name eq '--default--') {
if ($self->Done()) {
if (! $self->Preload()) {
$self->Debug("Making a preload node.");
$self->Preload(new ConfigTree::Node);
}
$node = $self->Preload();
$self->Debug("Using a preload node.");
} else {
$node = $self;
}
} else {
I can see that if the parser finds a second (third etc.)
"target --default--" stanza at the same level it passes the content
to the child node directly instead of normal inheritance mechanism.
But why?
Why --default-- targets are not simply merged?
(I want to mix manually maintained and machine generated config files
both containing "target --default--".)
Could somebody explain what was JRA's idea? :-)
Gabor
--
Spider-Pig, Spider-Pig
Does whatever a Spider-Pig does.
Can he swing from a web?
No, he can't, he's a pig.
Look out! He is a Spider-Pig.
Spider-Pig, Spider-Pig
Does whatever a Spider-Pig does.
Can he swing from a web?
No, he can't, he's a pig.
Look out! He is a Spider-Pig.