The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Graph::Flowchart::Node - A node in a Graph::Flowchart, representing a block/expression

SYNOPSIS

        use Devel::Graph;

        my $graph = Devel::Graph->graph( '$a = 9 if $b == 1' );

        print $graph->as_ascii();

DESCRIPTION

This module is used by Devel::Graph internally, there should be no need to use it directly.

EXPORT

Exports nothing on default but can export on request the following:

  N_START N_END N_BLOCK N_IF N_THEN N_ELSE N_JOINT N_END N_FOR N_BODY
  N_SUB
  N_CONTINUE N_GOTO N_RETURN N_BREAK N_NEXT N_LAST
  N_USE

METHODS

new()

        my $node = Graph::Flowchart::Node->new( $text, $type, $label);
        my $node = Graph::Flowchart::Node->new( $text, $type);

Create a new node of the given $type with the $text as label. The optional $label is the label for goto.

For instance:

        LABEL: $a = 1;
        goto LABEL;

would be turned into:

        my $n1 = Graph::Flowchart::Node->new( "$a = 1;\n", N_BLOCK, 'LABEL'); 
        my $n2 = Graph::Flowchart::Node->new( "goto LABEL;\n", N_GOTO); 

SEE ALSO

Devel::Graph, <Graph::Easy>.

COPYRIGHT AND LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms of the GPL version 2. See the LICENSE file for information.

AUTHOR

Copyright (C) 2004-2006 by Tels http://bloodgate.com