None available.
sub new
{ my $name = shift;
if($name =~ /\:\:/) {
$name = shift;
}
my $xml = shift if @_;
my $data = shift if @_;
my @nodes = ();
my %node = ();
my $node_ref =\% node;
$node{'name'} = $name;
$node{'nodes'} =\@ nodes;
$node{'xml'} = $xml if defined $xml;
$node{'data'} = (scalar keys %{$data} ? $data : {});
$node{'empty'} = 0;
bless $node_ref, 'LRG::Node';
return $node_ref; } |
sub newEmpty
{ my $name = shift;
my $xml = shift;
my $data = shift if @_;
my $node;
if(scalar keys %{$data}) {
$node = LRG::Node::new($name, $xml, $data);
}
else {
$node = LRG::Node::new($name, $xml);
}
$node->{'empty'} = 1;
return $node;
}
1; } |