ossp-pkg/cfg/perl/cfg.pm 1.5 -> 1.6
--- cfg.pm 2004/11/17 13:15:15 1.5
+++ cfg.pm 2004/11/20 16:51:52 1.6
@@ -241,11 +241,12 @@
return ($self->{-rc} == $self->CFG_OK ? $arg : undef);
}
-sub node_root ($) {
- my ($self) = @_;
- my $node;
- $self->{-rc} = cfg_node_root($self->{-cfg}, $node);
- return ($self->{-rc} == $self->CFG_OK ? $node : undef);
+sub node_root ($;$) {
+ my ($self, $node_new) = @_;
+ $node_new ||= \0;
+ my $node_old;
+ $self->{-rc} = cfg_node_root($self->{-cfg}, $node_new, $node_old);
+ return ($self->{-rc} == $self->CFG_OK ? $node_old : undef);
}
sub node_select ($$$) {
|
|