The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

PNI::Edge - is used to connect

SYNOPSIS

    # Connects the output of a node to the input of another node.
    my $edge = PNI::Edge->new( source => $output, target => $input );

ATTRIBUTES

source

    my $out = $edge->source;

target

    my $in = $edge->target;

METHODS

by_id

    use PNI::Edge;

    my $edge = PNI::Edge::by_id($edge_id);

Given an edge id, returns a reference to the edge.

task

    $edge->task;

If edge is connected, pass data from target to source.

to_hashref

    my $edge_hashref = $edge->to_hashref;

Returns an hash ref representing the edge.