my $update_values_at_level = sub { my $level = shift; #warn 'update values at level ' . $level . "\n"; #for( my $level = 1 ; $level <= $#hierarchy ; $level++ ) { for my $node ( @{ $hierarchy[$level] } ) { for my $input_name ( $node->input_names ) { #warn "looking at input $input_name of node $$node\n"; my $link = $node->get_link_of_input( $input_name ) or next;
if( my( $source_node , $source_output_name ) = ( $link->source->{node} , $link->source->{output_name} ) ) {
#warn 'source_node ' . $source_node , "\n";
#warn 'input_name ' . $input_name , "\n";
#warn $node->input->{$input_name} . ' = ' . $source_node->output->{$source_output_name} . "\n";
$node->input->{$input_name} = $source_node->output->{$source_output_name};
}
}
}
#}
};
NAME
PNI::Tree
SYNOPSIS
Don't use this module, it is a PNI internal.
DESCRIPTION
This class holds the PNI nodes and links hierarchy tree.
SUBS
- add_node
-
Adds a PNI node to the hierarchy tree. It's called by the PNI::NODE method. Returns a reference to the node created.
- add_link
-
Adds a PNI link to the hierarchy tree. It's called by the PNI::LINK method. Returns a reference to the new link created.
AUTHOR
G. Casati , <fibo@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2010 by G. Casati
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.