/[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 802 by dpavlin, Wed Dec 10 20:45:11 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 201  sub as_markup { Line 202  sub as_markup {
202                                  $name .= qq|<sup title="$role_name">$nr</sup>|;                                  $name .= qq|<sup title="$role_name">$nr</sup>|;
203                          }                          }
204    
205                          eval { $properties = $attr->documentation . ' ' . $properties };                          if ( my $doc = eval { $attr->documentation } ) {
206                                    $properties = qq|
207                                            $properties
208                                            <span class="documentation">$doc</span>
209                                    |;
210                                    $self->add_css(qq|
211                                            span.documentation {
212                                                    background: #eee;
213                                                    padding: 0.25em;
214                                                    float: left;
215                                                    clear: left;
216                                            }
217                                    |);
218                                    $introspect->{action}->{$name}->{documentation} = $doc;
219                            }
220    
221                          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>|
222                  } sort $meta->get_attribute_list                  } sort $meta->get_attribute_list
# Line 254  sub as_markup { Line 269  sub as_markup {
269    
270          $self->store( $introspect_path, $introspect );          $self->store( $introspect_path, $introspect );
271    
         $self->title( $class );  
   
272          my $has_tests = '';          my $has_tests = '';
273          my @tests = grep { defined $_ } $self->has_tests;          my @tests = grep { defined $_ } $self->has_tests;
274          if ( @tests ) {          if ( @tests ) {

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

  ViewVC Help
Powered by ViewVC 1.1.26