Graph-Easy-Introspect
view release on metacpan or search on metacpan
## Scripts
### graph_easy_introspect
Prints a human-readable orJSON AST
```text
Usage: graph_easy_introspect [options] file.dot
Output format:
--compact suppress port and path detail; show only edge endpoints
--dtd emit the AST in a format easier to read, via Data::TreeDumper
--json emit the AST as JSON
Supplementary data (text mode: printed as sections; json/dtd: included in dump):
--grid include the rendered character grid
--cell-grid include the cell-grid lookup table
--help show this message
```
lib/Graph/Easy/Introspect.pm view on Meta::CPAN
# Compute line_* for each path cell using a waypoint-based polyline model.
#
# Waypoints: [from_port_char, corner_0_bend, ..., corner_n_bend, to_port_char]
# Each corner cell either introduces a straight run (next cell is VER/HOR)
# or terminates one (prev cell is VER/HOR).
# Introducing corner: assign wp[ci]->wp[ci+1], then advance ci.
# Terminating corner: advance ci first, then assign wp[ci]->wp[ci+1].
# VER/HOR cells: always assign wp[ci]->wp[ci+1], never advance ci.
#
# This gives contiguous, directed segments: each cell's endpoint equals
# the next cell's start point.
my %is_straight_type = (VER => 1, HOR => 1, CROSS => 1, HOLE => 1) ;
my ($fp_lx, $fp_ly) = (0, 0) ;
my ($tp_lx, $tp_ly) = (0, 0) ;
unless ($is_self_loop)
{
($fp_lx, $fp_ly) = Graph::Easy::Introspect::face_char($from_ast_node, $from_side)
script/graph_easy_introspect view on Meta::CPAN
) or die "Usage: $0 [options] file.dot\n" ;
if ($opt_help)
{
print <<'HELP' ;
Usage: graph_easy_introspect [options] file.dot
Output format:
--json emit the AST as JSON
--dtd emit the AST via Data::TreeDumper
--compact suppress port and path detail; show only edge endpoints
Supplementary data (text mode: printed as sections; json/dtd: included in dump):
--grid include the rendered character grid
--cell-grid include the cell-grid lookup table
--help show this message
HELP
exit ;
}
( run in 0.578 second using v1.01-cache-2.11-cpan-39bf76dae61 )