/[Frey]/trunk/lib/Frey/Class/Graph.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/Class/Graph.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1079 by dpavlin, Thu Jun 4 20:30:24 2009 UTC revision 1133 by dpavlin, Tue Jun 30 15:10:55 2009 UTC
# Line 2  package Frey::Class::Graph; Line 2  package Frey::Class::Graph;
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    
# Line 90  has portrait => ( Line 88  has portrait => (
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',
# Line 109  sub as_markup { Line 113  sub as_markup {
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',
# Line 158  sub as_markup { Line 162  sub as_markup {
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                          }                          }
# Line 211  sub as_markup { Line 215  sub as_markup {
215    
216  }  }
217    
218    __PACKAGE__->meta->make_immutable;
219    no Moose;
220    
221  1;  1;

Legend:
Removed from v.1079  
changed lines
  Added in v.1133

  ViewVC Help
Powered by ViewVC 1.1.26