LRG Node
Other packages in the module: LRG LRG::LRG
Included librariesPackage variablesGeneral documentationMethods
Toolbar
WebCvsRaw content
Package variables
No package variables defined.
Inherit
LRG::LRG
Synopsis
No synopsis!
Description
No description!
Methods
new
No description
Code
newEmpty
No description
Code
Methods description
None available.
Methods code
newdescriptionprevnextTop
sub new {
    my $name = shift;
	
	if($name =~ /\:\:/) {
		$name = shift;
	}
	
    my $xml = shift if @_;
    
    # look for an additional arg containing
# data to be written in the tag itself
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;
}
newEmptydescriptionprevnextTop
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;
}
General documentation
No general documentation available.