403Webshell
Server IP : 103.119.228.120  /  Your IP : 3.145.85.74
Web Server : Apache
System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User : nobody ( 99)
PHP Version : 5.6.40
Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime
MySQL : ON |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : ON |  Pkexec : ON
Directory :  /usr/local/ssl/local/ssl/local/ssl/local/ssl/local/ssl/local/share/man/man3/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/local/ssl/local/ssl/local/ssl/local/ssl/local/ssl/local/share/man/man3/Graph::Flowchart.3pm
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{
.    if \nF \{
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "Graph::Flowchart 3"
.TH Graph::Flowchart 3 "2007-12-15" "perl v5.16.3" "User Contributed Perl Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
Graph::Flowchart \- Generate easily flowcharts as Graph::Easy objects
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\&        use Graph::Flowchart;
\&
\&        my $flow = Graph::Flowchart\->new();
\&
\&        print $flow\->as_ascii();
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
This module lets you easily create flowcharts as Graph::Easy
objects. This means you can output your flowchart as \s-1HTML,
ASCII,\s0 Boxart (unicode drawing) or \s-1SVG.\s0
.PP

.IX Xref "graph ascii html svg boxart unicode flowchart diagram"
.SS "Classes"
.IX Subsection "Classes"
The nodes constructed by the various \f(CW\*(C`add_*\*(C'\fR methods will set the subclass
of the node according to the following list:
.IP "start" 2
.IX Item "start"
The start block.
.IP "end" 2
.IX Item "end"
The end block, created by \f(CW\*(C`finish()\*(C'\fR.
.IP "block" 2
.IX Item "block"
Orindary code blocks, f.i. from \f(CW\*(C`$b = 9;\*(C'\fR.
.IP "if, for, while, until" 2
.IX Item "if, for, while, until"
Blocks for the various constructs for conditional and loop constructs.
.IP "sub" 2
.IX Item "sub"
For sub routine declarations.
.IP "use" 2
.IX Item "use"
For \f(CW\*(C`use\*(C'\fR, \f(CW\*(C`no\*(C'\fR and \f(CW\*(C`require\*(C'\fR statements.
.IP "goto, break, return, next, last, continue" 2
.IX Item "goto, break, return, next, last, continue"
Blocks for the various constructs for jumps/returns.
.IP "true, false, goto, call, return, break, next, continue" 2
.IX Item "true, false, goto, call, return, break, next, continue"
Classes for edges of the true and false if-branches, and for goto, as well
as sub routine calls.
.PP
Each class will get some default attributes, like \f(CW\*(C`if\*(C'\fR constructs having
a diamond-shape.
.PP
You can override the graph appearance most easily by changing the
(sub)\-class attributes:
.PP
.Vb 1
\&        my $chart = Graph::Flowchart\->new();
\&
\&        $chart\->add_block(\*(Aq$a = 9;\*(Aq);
\&        $chart\->add_if_then(\*(Aq$a == 9;\*(Aq, \*(Aq$b = 1;\*(Aq);
\&        $chart\->finish();
\&
\&        my $graph = $chart\->as_graph();
.Ve
.PP
Now \f(CW$graph\fR is a \f(CW\*(C`Graph::Easy\*(C'\fR object and you can manipulate the
class attributes like so:
.PP
.Vb 3
\&        $graph\->set_attribute(\*(Aqnode.if\*(Aq, \*(Aqfill\*(Aq, \*(Aqred\*(Aq);
\&        $graph\->set_attribute(\*(Aqedge.true\*(Aq, \*(Aqcolor\*(Aq, \*(Aqgreen\*(Aq);
\&        print $graph\->as_html_file();
.Ve
.PP
This will color all conditional blocks red, and edges that represent
the \f(CW\*(C`true\*(C'\fR branch green.
.SH "EXPORT"
.IX Header "EXPORT"
Exports nothing.
.SH "METHODS"
.IX Header "METHODS"
All block-inserting routines on the this model will insert the
block on the given position, or if this is not provided,
on the current position. After inserting the blocks, the current
position will be updated.
.PP
In addition, the newly inserted block(s) might be merged with
blodcks at the current position.
.SS "\fInew()\fP"
.IX Subsection "new()"
.Vb 1
\&        my $grapher = Graph::Flowchart\->new();
.Ve
.PP
Creates a new \f(CW\*(C`Graph::Flowchart\*(C'\fR object.
.SS "\fIas_graph()\fP"
.IX Subsection "as_graph()"
.Vb 1
\&        my $graph = $grapher\->as_graph();
.Ve
.PP
Return the internal data structure as \f(CW\*(C`Graph::Easy\*(C'\fR object.
.SS "\fIas_ascii()\fP"
.IX Subsection "as_ascii()"
.Vb 1
\&        print $grapher\->as_ascii();
.Ve
.PP
Returns the flow chart as \s-1ASCII\s0 art drawing.
.SS "\fIas_boxart()\fP"
.IX Subsection "as_boxart()"
.Vb 1
\&        print $grapher\->as_boxart();
.Ve
.PP
Returns the flow chart as a Unicode boxart drawing.
.SS "\fIas_html_file()\fP"
.IX Subsection "as_html_file()"
.Vb 1
\&        print $grapher\->as_html_file();
.Ve
.PP
Returns the flow chart as entire \s-1HTML\s0 page.
.SS "\fIcurrent_block()\fP"
.IX Subsection "current_block()"
.Vb 2
\&        my $insertion = $grapher\->current_block();      # get
\&        $grapher\->current_block( $block);               # set
.Ve
.PP
Get or set the current block in the flow chart, e.g. where new code blocks
will be inserted by the \f(CW\*(C`add_*\*(C'\fR methods.
.PP
Needs a \f(CW\*(C`Graph::Flowchart::Node\*(C'\fR as argument, which is usually
an object returned by one of the \f(CW\*(C`add_*\*(C'\fR methods.
.SS "\fIcurrent()\fP"
.IX Subsection "current()"
\&\f(CW\*(C`current()\*(C'\fR is an alias for \f(CW\*(C`current_block()\*(C'\fR.
.SS "\fImake_current()\fP"
.IX Subsection "make_current()"
.Vb 1
\&        $grapher\->make_current($block);
.Ve
.PP
Set the given block as current, and convert it to a joint.
.SS "\fIfirst_block()\fP"
.IX Subsection "first_block()"
.Vb 2
\&        my $first = $grapher\->first_block();            # get
\&        $grapher\->first_block( $block );                # set
.Ve
.PP
Get or set the first block in the flow chart, usually the 'start' block.
.PP
Needs a \f(CW\*(C`Graph::Flowchart::Node\*(C'\fR as argument, which is usually
an object returned by one of the \f(CW\*(C`add_*\*(C'\fR methods.
.SS "\fIlast_block()\fP"
.IX Subsection "last_block()"
.Vb 2
\&        my $last = $grapher\->last_block();              # get
\&        $grapher\->last_block( $block);                  # set
.Ve
.PP
Get or set the last block in the flow chart, usually the block where you
last added something via one of the \f(CW\*(C`add_*\*(C'\fR routines.
.PP
Needs a \f(CW\*(C`Graph::Flowchart::Node\*(C'\fR as argument, which is usually
an object returned by one of the \f(CW\*(C`add_*\*(C'\fR methods.
.PP
The returned block will only be the last block if you call \f(CW\*(C`finish()\*(C'\fR
beforehand.
.SS "\fIstart_node()\fP"
.IX Subsection "start_node()"
.Vb 1
\&        my $start = $grapher\->start_node();
.Ve
.PP
Returns the \s-1START\s0 node. See also \fIfirst_block()\fR.
.SS "\fIend_node()\fP"
.IX Subsection "end_node()"
.Vb 1
\&        my $end = $grapher\->end_node();
.Ve
.PP
Returns the \s-1END\s0 node. See also \fIlast_block()\fR.
.SS "\fIfinish()\fP"
.IX Subsection "finish()"
.Vb 2
\&        my $last = $grapher\->finish( $block );
\&        my $last = $grapher\->finish( );
.Ve
.PP
Adds an end-block. If no parameter is given, uses the current position,
otherwise appends the end block to the given \f(CW$block\fR. See also
\&\f(CW\*(C`current_block\*(C'\fR. Will also update the position of \f(CW\*(C`last_block\*(C'\fR to point
to the newly added block, and return this block.
.SS "\fInew_block()\fP"
.IX Subsection "new_block()"
.Vb 2
\&        my $block = $grapher\->new_block( $text, $type );
\&        my $block = $grapher\->new_block( $text, $type, $label );
.Ve
.PP
Creates a new block from the given text and type. The type is one
of the \f(CW\*(C`N_*\*(C'\fR from \f(CW\*(C`Graph::Flowchart::Node\*(C'\fR.
.PP
The optional label gives the label name, which can be used by goto
constructs as target node. See also \f(CW\*(C`find_target()\*(C'\fR.
.SS "\fIfind_target()\fP"
.IX Subsection "find_target()"
.Vb 1
\&        my $target = $grapher\->find_target( $label );
.Ve
.PP
Given the label \f(CW$label\fR, find the block that has this text as label
and returns it. Returns undef if the block doesn't exists yet.
.SS "\fIadd_group()\fP"
.IX Subsection "add_group()"
.Vb 1
\&        $grapher\->add_group($group_name);
.Ve
.PP
Add a group to the flowchart, and set it as current.
.SS "\fIno_group()\fP"
.IX Subsection "no_group()"
.Vb 1
\&        $grapher\->no_group();
.Ve
.PP
Forget the current group.
.SS "\fIadd_block()\fP"
.IX Subsection "add_block()"
.Vb 2
\&        my $current = $grapher\->add_block( $block );
\&        my $current = $grapher\->add_block( $block, $where );
.Ve
.PP
Add the given block. See \f(CW\*(C`new_block\*(C'\fR on creating the block before hand.
.PP
The optional \f(CW$where\fR parameter is the point where the code will be
inserted. If not specified, it will be appended to the current block,
see \f(CW\*(C`current_block\*(C'\fR.
.PP
Returns the newly added block as current.
.PP
Example:
.PP
.Vb 3
\&        +\-\-\-\-\-\-\-\-\-+
\&    \-\-> | $a = 9; | \-\->
\&        +\-\-\-\-\-\-\-\-\-+
.Ve
.SS "\fIadd_new_block()\fP"
.IX Subsection "add_new_block()"
.Vb 1
\&        my $new = $grapher\->add_new_block( $text, $type, $label, $where);
.Ve
.PP
Creates a new block, and adds it to the flowchart. Might merge the new block
into the current one, and then returns the new current block.
.SS "\fIadd_new_joint()\fP"
.IX Subsection "add_new_joint()"
.Vb 2
\&        my $joint = $grapher\->add_new_joint();
\&        my $joint = $grapher\->add_new_joint($where);
.Ve
.PP
Is a shortcut for \f(CW\*(C`add_block(new_block(\*(Aq\*(Aq, N_JOINT()))\*(C'\fR and creates and
adds a joint to the flowchart. The optional parameter \f(CW$where\fR takes the
block where to attach the join to.
.SS "insert_block"
.IX Subsection "insert_block"
.Vb 1
\&        my $new = $grapher\->insert_block($block, $where);
.Ve
.PP
Insert a block to the current (or \f(CW$where\fR) block. Any outgoing connections
from \f(CW$where\fR are moved to the new block (unless the blocks are merged).
.SS "insert_new_block"
.IX Subsection "insert_new_block"
.Vb 1
\&        my $new = $grapher\->insert_new_block($where);
.Ve
.PP
A short cut for:
.PP
.Vb 2
\&        my $block = $grapher\->new_block( ... );
\&        my $new = $grapher\->insert_block($block, $where);
.Ve
.PP
See \f(CW\*(C`insert_block()\*(C'\fR.
.SS "insert_new_joint"
.IX Subsection "insert_new_joint"
.Vb 1
\&        my $new = $grapher\->insert_new_joint($where);
.Ve
.PP
A short cut for:
.PP
.Vb 2
\&        my $joint = $grapher\->add_joint( ... );
\&        my $new = $grapher\->insert_block($joint, $where);
.Ve
.PP
See \f(CW\*(C`insert_block()\*(C'\fR.
.SS "\fIconnect()\fP"
.IX Subsection "connect()"
.Vb 3
\&        my $edge = $grapher\->connect( $from, $to );
\&        my $edge = $grapher\->connect( $from, $to, $edge_label );
\&        my $edge = $grapher\->connect( $from, $to, $edge_label, $edge_class );
.Ve
.PP
Connects two blocks with an edge, setting the optional edge label and edge
class.
.PP
Returns the \f(CW\*(C`Graph::Easy::Edge\*(C'\fR object for the connection.
.SS "\fImerge_blocks()\fP"
.IX Subsection "merge_blocks()"
.Vb 1
\&        $grapher\->merge_blocks($first,$second);
.Ve
.PP
If possible, merge the given two blocks into one block, keeping all connections
to the first, and all from the second. Any connections between the two
blocks is dropped.
.PP
Example:
.PP
.Vb 3
\&        +\-\-\-\-\-\-\-\-\-+     +\-\-\-\-\-\-\-\-\-+
\&    \-\-> | $a = 9; | \-\-> | $b = 2; | \-\->
\&        +\-\-\-\-\-\-\-\-\-+     +\-\-\-\-\-\-\-\-\-+
.Ve
.PP
This will be turned into:
.PP
.Vb 4
\&        +\-\-\-\-\-\-\-\-\-+ 
\&    \-\-> | $a = 9; | \-\->
\&        | $b = 2; | 
\&        +\-\-\-\-\-\-\-\-\-+
.Ve
.SS "\fIcollapse_joints()\fP"
.IX Subsection "collapse_joints()"
.Vb 1
\&        $grapher\->cleanup_joints();
.Ve
.PP
Is called automatically by \fIfinish()\fR. This will collapse any left-over joint nodes:
.PP
.Vb 3
\&                +\-\-\-+             +\-\-\-\-\-\-\-+
\&    \-\- false \-\-> | * | \-\- next \-\-> | $b++; | \-\->
\&                +\-\-\-+             +\-\-\-\-\-\-\-+
.Ve
.PP
Will be turned into:
.PP
.Vb 3
\&                       +\-\-\-\-\-\-\-+
\&    \-\- false, next \-\-> | $b++; | \-\->
\&                       +\-\-\-\-\-\-\-+
.Ve
.SH "ADDITIONAL METHODS"
.IX Header "ADDITIONAL METHODS"
Note that the following routines will not work when used recursively, because
they add the entire structure already connect, at once.
.PP
If you want a if-then-else, which
contains another if-then-else, for instance, you need to construct
the blocks first, and then connect them manually.
.PP
Pleasee \f(CW\*(C`Devel::Graph\*(C'\fR on how to do this.
.SS "\fIadd_if_then()\fP"
.IX Subsection "add_if_then()"
.Vb 2
\&        my $current = $grapher\->add_if_then( $if, $then);
\&        my $current = grapher\->add_if_then( $if, $then, $where);
.Ve
.PP
Add an if-then branch to the flowchart. The optional \f(CW$where\fR parameter
defines at which block to attach the construct.
.PP
Returns the new current block, which is a \f(CW\*(C`joint\*(C'\fR.
.PP
Example:
.PP
.Vb 6
\&                                             false
\&          +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
\&          |                                            v
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-+  true   +\-\-\-\-\-\-\-\-\-+
\&    \-\-> | if ($a = 9) | \-\-\-\-\-\-> | $b = 1; | \-\-\-\-\-\-\->   *   \-\->
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-+         +\-\-\-\-\-\-\-\-\-+
.Ve
.SS "\fIadd_if_then_else()\fP"
.IX Subsection "add_if_then_else()"
.Vb 2
\&        my $current = $grapher\->add_if_then_else( $if, $then, $else);
\&        my $current = $grapher\->add_if_then_else( $if, $then, $else, $where);
.Ve
.PP
Add an if-then-else branch to the flowchart.
.PP
The optional \f(CW$where\fR parameter defines at which block to attach the
construct.
.PP
Returns the new current block, which is a \f(CW\*(C`joint\*(C'\fR.
.PP
Example:
.PP
.Vb 9
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-+
\&        |   $b = 2;   | \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-+                           |
\&          ^                                       |
\&          | false                                 |
\&          |                                       v
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-+  true   +\-\-\-\-\-\-\-\-\-+
\&    \-\-> | if ($a = 9) | \-\-\-\-\-\-> | $b = 1; | \-\->   *   \-\->
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-+         +\-\-\-\-\-\-\-\-\-+
.Ve
.PP
If \f(CW$else\fR is not defined, works just like \f(CW\*(C`add_if_then()\*(C'\fR.
.SS "\fIadd_for()\fP"
.IX Subsection "add_for()"
.Vb 2
\&        my ($current,$body,$continue) = $grapher\->add_for( $init, $while, $cont, $body, $continue);
\&        my ($current,$body,$continue) = $grapher\->add_for( $init, $while, $cont, $body, $continue, $where);
.Ve
.PP
Add a \f(CW\*(C`for (my $i = 0; $i < 12; $i++) { ... } continue {}\*(C'\fR style loop.
.PP
The optional \f(CW$where\fR parameter defines at which block to attach the
construct.
.PP
This routine returns three block positions, the current block (e.g. after
the loop), the block of the loop body and the position of the (optional)
continue block.
.PP
Example:
.PP
.Vb 9
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+  false        
\&    \-\-> |   for: $i < 10;    | \-\-\-\-\-\-\->  *  \-\->
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
\&          |                ^
\&          | true           +\-\-\-\-+
\&          v                     |
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+     +\-\-\-\-\-\-\-\-+
\&        |     $a++;     | \-\-> |  $i++  |
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+     +\-\-\-\-\-\-\-\-+
.Ve
.SS "\fIadd_foreach()\fP"
.IX Subsection "add_foreach()"
.Vb 2
\&        my ($current,$body,$continue) = $grapher\->add_foreach( $list, $body, $cont);
\&        my ($current,$body,$continue) = $grapher\->add_foreach( $list, $body, $cont, $where);
.Ve
.PP
Add a \f(CW\*(C`for my $var (@lies) { ... }\*(C'\fR style loop.
.PP
The optional \f(CW$where\fR parameter defines at which block to attach the
construct.
.PP
This routine returns three block positions, the current block (e.g. after
the loop), the block of the loop body and the position of the (optional)
continue block.
.PP
Example:
.PP
.Vb 9
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+  false        
\&    \-\-> |   for my $i (@list)  | \-\-\-\-\-\-\->  *  \-\->
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
\&          |                ^
\&          | true           +\-\-\-\-+
\&          v                     |
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+     +\-\-\-\-\-\-\-\-+
\&        |     $a++;     | \-\-> |  $i++  |        # body and continue block
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+     +\-\-\-\-\-\-\-\-+
.Ve
.SS "\fIadd_while()\fP"
.IX Subsection "add_while()"
.Vb 2
\&        my ($current,$body, $cont) = 
\&          $grapher\->add_while($while, $body, $cont, $where) = @_;
.Ve
.PP
To skip the continue block, pass \f(CW$cont\fR as undef.
.PP
This routine returns three block positions, the current block (e.g. after
the loop), the block of the loop body and the continue block.
.PP
Example of a while loop with only the body (or only the \f(CW\*(C`continue\*(C'\fR block):
.PP
.Vb 9
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+  false  
\&    \-\-> |   while ($b < 19)    | \-\-\-\-\-\-\->  *  \-\->
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
\&          |                  ^
\&          | true             |
\&          v                  |
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+  |
\&        |      $b++;      |\-\-+
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
.Ve
.PP
Example of a while loop with body and continue block (note similiarity to for
loop):
.PP
.Vb 9
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+  false        
\&    \-\-> | while ($i < 10)    | \-\-\-\-\-\-\->  *  \-\->
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
\&          |                ^
\&          | true           +\-\-\-\-+
\&          v                     |
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+     +\-\-\-\-\-\-\-\-+
\&        |     $a++;     | \-\-> |  $i++  |
\&        +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+     +\-\-\-\-\-\-\-\-+
.Ve
.SS "\fIadd_until()\fP"
.IX Subsection "add_until()"
.Vb 2
\&        my ($current,$body, $cont) = 
\&          $grapher\->add_until($until, $body, $cont, $where) = @_;
.Ve
.PP
To skip the continue block, pass \f(CW$cont\fR as undef.
.PP
Works just like while, but reverses the \f(CW\*(C`true\*(C'\fR and \f(CW\*(C`false\*(C'\fR edges
to represent a \f(CW\*(C`until () BLOCK continue BLOCK\*(C'\fR loop.
.PP
See also \f(CW\*(C`add_while()\*(C'\fR.
.SS "\fIadd_jump()\fP"
.IX Subsection "add_jump()"
.Vb 2
\&        my $jump = $grapher\->add_jump ( $text, $type, $label, $target);
\&        my ($jump,$target) = $grapher\->add_jump ( $text, $type, $label);
.Ve
.PP
Adds a jump block, with a connection to \f(CW$target\fR. If \f(CW$target\fR is just
the label name, will try to find a block with that label. If no block
can be found, will create it.
.PP
The type is one of:
.PP
.Vb 6
\&        goto
\&        break
\&        return
\&        last
\&        next
\&        continue
.Ve
.SS "\fIadd_joint()\fP"
.IX Subsection "add_joint()"
.Vb 1
\&        my $joint = $grapher\->add_joint( @blocks );
.Ve
.PP
Adds a joint (an unlabeled, star-shaped node) to the flowchart and then
connects each block in the given list to that joint. This is used
f.i. by if-then-else constructs that need a common joint where all
the branches join together again.
.PP
When adding a block right after a joint, they will be merged together
and the joint will be effectively replaced by the block.
.PP
Example:
.PP
.Vb 1
\&    \-\->   *   \-\->
.Ve
.SH "SEE ALSO"
.IX Header "SEE ALSO"
Graph::Easy, Devel::Graph.
.SH "COPYRIGHT AND LICENSE"
.IX Header "COPYRIGHT AND LICENSE"
This library is free software; you can redistribute it and/or modify
it under the same terms of the \s-1GPL\s0 version 2 or later.
See the \s-1LICENSE\s0 file for information.
.PP

.IX Xref "gpl"
.SH "AUTHOR"
.IX Header "AUTHOR"
Copyright (C) 2004\-2007 by Tels <http://bloodgate.com>
.PP

.IX Xref "tels bloodgate.com"

Youez - 2016 - github.com/yon3zu
LinuXploit