2 |
use Moose; |
use Moose; |
3 |
|
|
4 |
extends 'Frey'; |
extends 'Frey'; |
5 |
with 'Frey::Web'; |
with 'Frey::Web', 'Frey::File', 'Frey::Storage'; |
|
with 'Frey::File'; |
|
|
with 'Frey::Storage'; |
|
6 |
|
|
7 |
use GraphViz; |
use GraphViz; |
8 |
|
|
88 |
isa => 'Bool', |
isa => 'Bool', |
89 |
); |
); |
90 |
|
|
91 |
|
has no_overlap => ( |
92 |
|
documentation => 'avoid overlaping nodes', |
93 |
|
is => 'rw', |
94 |
|
isa => 'Bool', |
95 |
|
); |
96 |
|
|
97 |
has produce_dot => ( |
has produce_dot => ( |
98 |
documentation => 'dump .dot text format', |
documentation => 'dump .dot text format', |
99 |
is => 'rw', |
is => 'rw', |
113 |
# layout => 'neato', # grabs too much memory |
# layout => 'neato', # grabs too much memory |
114 |
# layout => 'twopi', # grabs too much memory |
# layout => 'twopi', # grabs too much memory |
115 |
# overlap => 'compress', |
# overlap => 'compress', |
116 |
no_overlap => 1, |
no_overlap => $self->no_overlap, |
117 |
|
|
118 |
node => { |
node => { |
119 |
shape => 'box', |
shape => 'box', |
162 |
foreach my $role ( keys %{ $data->{roles} } ) { |
foreach my $role ( keys %{ $data->{roles} } ) { |
163 |
next if $filter && $self->filter_roles && $role !~ m{$filter}; |
next if $filter && $self->filter_roles && $role !~ m{$filter}; |
164 |
warn "# $class\trole\t$role\n"; |
warn "# $class\trole\t$role\n"; |
165 |
$g->add_edge( $role => $class, label => 'role', color => 'yellow' ); |
$g->add_edge( $role => $class, label => 'with', color => 'yellow' ); |
166 |
# $g->add_node( $role, rank => 'role' ); |
$g->add_node( $role, shape => 'diamond' ); |
167 |
$count->{$class}++; |
$count->{$class}++; |
168 |
$count->{$role}++; |
$count->{$role}++; |
169 |
} |
} |
215 |
|
|
216 |
} |
} |
217 |
|
|
218 |
|
__PACKAGE__->meta->make_immutable; |
219 |
|
no Moose; |
220 |
|
|
221 |
1; |
1; |