NAME

PNI - Perl Node Interface

ATTENTION

The Perl Node Interface was created to be used via browser, anyway you are free to use the scripting api if it does make sense.

SYNOPSIS

$ pni daemon

Then point your browser to http://localhost:3000 and use the gui.

DESCRIPTION

Hi all! I'm an italian mathematician. I really like Perl philosophy 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 a package is. 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 :-)

METHODS

edge

my $source_node = PNI::node 'Some::Node';
my $target_node = PNI::node 'Another::Node';

my $edge = PNI::edge $source_node         => $target_node , 
                     'source_output_name' => 'target_input_name';

Connects an output of a node to an input of another node.

files

my @pni_files = PNI::files;

Returns a list of all .pni files in PNI.pm install dir and subdirs.

node

# Load PNI::Node::Foo::Bar node. 
my $node = PNI::node 'Foo::Bar';

Creates a node by its PNI type, that is the name of a package under the PNI::Node namespace, and adds it to the root scenario.

# No PNI type returns an empty node.
my $node = PNI::node;

PNI creates an empty node.

node_list

my @nodes = PNI::node_list;

Returns a list of available PNI nodes.

This method delegates to PNI::Finder nodes method.

loop

PNI::loop;

Starts the PNI main loop. It keeps calling task as fast as it can.

root

my $root = PNI::root;

Returns the root PNI::Scenario.

scen

my $scen = PNI::scen;

task

PNI::task;

Calls the task method for every loaded node. This method delegates to the root scenario task method.

SEE ALSO

PNI blog

PNI repository

AUTHOR

G. Casati , <fibo@cpan.org>

LICENSE AND COPYRIGHT

Copyright (C) 2009-2012, Gianluca Casati

This program is free software, you can redistribute it and/or modify it under the same terms of the Artistic License version 2.0.