90 |
isa => 'Bool', |
isa => 'Bool', |
91 |
); |
); |
92 |
|
|
93 |
|
has no_overlap => ( |
94 |
|
documentation => 'avoid overlaping nodes', |
95 |
|
is => 'rw', |
96 |
|
isa => 'Bool', |
97 |
|
); |
98 |
|
|
99 |
has produce_dot => ( |
has produce_dot => ( |
100 |
documentation => 'dump .dot text format', |
documentation => 'dump .dot text format', |
101 |
is => 'rw', |
is => 'rw', |
115 |
# layout => 'neato', # grabs too much memory |
# layout => 'neato', # grabs too much memory |
116 |
# layout => 'twopi', # grabs too much memory |
# layout => 'twopi', # grabs too much memory |
117 |
# overlap => 'compress', |
# overlap => 'compress', |
118 |
no_overlap => 1, |
no_overlap => $self->no_overlap, |
119 |
|
|
120 |
node => { |
node => { |
121 |
shape => 'box', |
shape => 'box', |
164 |
foreach my $role ( keys %{ $data->{roles} } ) { |
foreach my $role ( keys %{ $data->{roles} } ) { |
165 |
next if $filter && $self->filter_roles && $role !~ m{$filter}; |
next if $filter && $self->filter_roles && $role !~ m{$filter}; |
166 |
warn "# $class\trole\t$role\n"; |
warn "# $class\trole\t$role\n"; |
167 |
$g->add_edge( $role => $class, label => 'role', color => 'yellow' ); |
$g->add_edge( $role => $class, label => 'with', color => 'yellow' ); |
168 |
# $g->add_node( $role, rank => 'role' ); |
$g->add_node( $role, shape => 'diamond' ); |
169 |
$count->{$class}++; |
$count->{$class}++; |
170 |
$count->{$role}++; |
$count->{$role}++; |
171 |
} |
} |