NAME
PNI - Perl Node Interface
SYNOPSIS
use PNI;
my $node = PNI::NODE 'Perlfunc::Print';
$node->set_input( list => 'Hello World !' );
$node->set_input( do_print => 1 );
PNI::RUN;
DESCRIPTION
Hi! I'm an italian mathematician. I really like Perl phylosophy as Larry jokes a lot even if he is one of the masters of hacking.
PNI stands for Perl Node Interface.
It is my main project, my contribution to the great Perl community. Node programming is really interesting since makes possible to realize a program even if you have no idea about programming.
Think about genetic researchers, for example. They need to focus on protein chains, not on what is a package. Maybe they can do an extra effort and say the world "variable" or "string" or even "regular expression" and that makes them proud, but they don't care about inheritance.
They want things working and they need Perl ... but if you say Strawberry they think about yogurt, not about Windows.
There are a lot of node programming languages (VVVV, Puredata, Max/Msp) but normally they target artists and interaction designers. I saw a lot of vjs and musicians do really complex programs with those software, and they never wrote a line of code.
This is my effort to provide a node interface that brings Perl power to people who don't know the Perl language.
Blah blah blah. ( this was the h2xs command :-)
EXPORT
PNI module does not export subs, you have to call them directly. They are all uppercase and you can omit parenthesis, like
PNI::NODE 'Some::Node';
PNI::RUN;
They often delegates to other modules methods inside the PNI namespace.
SUBROUTINES/METHODS
- PNI::LINK
-
Connects an output of a node to an input of another node.
my $source_node = PNI::NODE 'Some::Node'; my $target_node = PNI::NODE 'Another::Node'; PNI::LINK $source_node => $target_node , 'source_output_name' => 'target_input_name';
Delegates to PNI::Tree::add_link.
- PNI::NODE
-
Creates a node by its pni type. If you write
PNI::NODE 'Some::Node'
PNI do the following steps:
requires the PNI/Node/Some/Node.pm module .
creates a new PNI::Node, assigns it an id and bless it as a PNI::Node::Some::Node .
calls the init method as implemented in the PNI::Node::Some::Node package .
Delegates to PNI::Tree::add_node.
- PNI::NODECOLLECTION
-
Returns available nodes in an hash reference like this:
$node_collection = {
node_category1 => [ qw( /node/path1 , /node/path2 , ... ) ],
node_category2 => [ qw( /node/path1 , /node/path2 , ... ) ],
...
}
- PNI::RUN
-
Updates the tree node hierarchy and calls the task method for every loaded node.
- PNI::LOOP
-
Starts the PNI main loop, it keeps calling PNI::RUN as fast as it can.
SEE ALSO
PNI::Node
PNI::Tree
PNI::Link
PNI::Node::Perlfunc
PNI::Node::Perlop
PNI::Node::Perlvar
AUTHOR
G. Casati , <fibo@cpan.org>
LICENSE AND COPYRIGHT
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 .