/[Frey]/trunk/lib/Frey/Introspect.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/Introspect.pm

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

revision 733 by dpavlin, Sat Dec 6 00:43:28 2008 UTC revision 884 by dpavlin, Wed Dec 24 12:43:41 2008 UTC
# Line 108  sub as_markup { Line 108  sub as_markup {
108          my ( $meta, $is_role ) = $self->class_meta;          my ( $meta, $is_role ) = $self->class_meta;
109    
110          my $class = $self->class;          my $class = $self->class;
111            $self->title( $class );
112    
113          my $introspect_path = "var/introspect/$class.yaml";          my $introspect_path = "var/introspect/$class.yaml";
114          $self->mkbasepath( $introspect_path );          $self->mkbasepath( $introspect_path );
115          my $introspect = $self->load( $introspect_path );          my $introspect; # FIXME update with = $self->load( $introspect_path );
116    
117          my ( $superclasses, $roles ) = ( '<b>Role</b>', '' );          my ( $superclasses, $roles ) = ( '<b>Role</b>', '' );
118          if ( ! $is_role ) {          if ( ! $is_role ) {
# Line 160  sub as_markup { Line 161  sub as_markup {
161                          $introspect->{methods}->{$name} = {};                          $introspect->{methods}->{$name} = {};
162                  }                  }
163                  qq|<td class="m">$name</td>|                  qq|<td class="m">$name</td>|
164          } sort $self->class_methods( $class );          } sort {
165                    lc($a) cmp lc($b)      
166            } $self->class_methods( $class );
167    
168          my @attributes;          my @attributes;
169          if ( $meta->get_attribute_list ) {          if ( $meta->get_attribute_list ) {
# Line 201  sub as_markup { Line 204  sub as_markup {
204                                  $name .= qq|<sup title="$role_name">$nr</sup>|;                                  $name .= qq|<sup title="$role_name">$nr</sup>|;
205                          }                          }
206    
207                          eval { $properties = $attr->documentation . ' ' . $properties };                          if ( my $doc = eval { $attr->documentation } ) {
208                                    $properties = qq|
209                                            $properties
210                                            <span class="documentation">$doc</span>
211                                    |;
212                                    $self->add_css(qq|
213                                            span.documentation {
214                                                    background: #eee;
215                                                    padding: 0.25em;
216                                                    float: left;
217                                                    clear: left;
218                                            }
219                                    |);
220                                    $introspect->{action}->{$name}->{documentation} = $doc;
221                            }
222    
223                          qq|<td class="a">$html_name</td><td class="t">$type</td><td>$properties</td>|                          qq|<td class="a">$html_name</td><td class="t">$type</td><td>$properties</td>|
224                  } sort $meta->get_attribute_list                  } sort $meta->get_attribute_list
# Line 254  sub as_markup { Line 271  sub as_markup {
271    
272          $self->store( $introspect_path, $introspect );          $self->store( $introspect_path, $introspect );
273    
         $self->title( $class );  
   
274          my $has_tests = '';          my $has_tests = '';
275          my @tests = grep { defined $_ } $self->has_tests;          my @tests = grep { defined $_ } $self->has_tests;
276          if ( @tests ) {          if ( @tests ) {

Legend:
Removed from v.733  
changed lines
  Added in v.884

  ViewVC Help
Powered by ViewVC 1.1.26