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

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

revision 243 by dpavlin, Sun Nov 2 21:24:04 2008 UTC revision 254 by dpavlin, Tue Nov 4 19:11:06 2008 UTC
# Line 154  sub markup { Line 154  sub markup {
154                          my ( $before, $title, $after ) = ( '', '', '' );                          my ( $before, $title, $after ) = ( '', '', '' );
155                          ( $before, $title, $after ) = ( '<b>', ' title="required"', '</b>' ) if $attr->is_required;                          ( $before, $title, $after ) = ( '<b>', ' title="required"', '</b>' ) if $attr->is_required;
156  warn $attr->dump(3);  warn $attr->dump(3);
157                          foreach my $check ( qw/has_type_constraint has_handles is_weak_ref is_required is_lazy should_coerce should_auto_deref has_trigger has_documentation has_applied_traits/ ) {                          foreach my $check ( qw/has_type_constraint has_handles is_weak_ref is_required is_lazy should_coerce should_auto_deref has_default has_trigger has_documentation has_applied_traits/ ) {
158                                  my $getter;                                  my $getter;
159                                                                    
160                                  $getter = $check;                                  $getter = $check;
# Line 165  warn $attr->dump(3); Line 165  warn $attr->dump(3);
165                                                  $after .= "$check";                                                  $after .= "$check";
166                                          } else {                                          } else {
167                                                  $after .= qq{<span class="frey-popdown">$check};                                                  $after .= qq{<span class="frey-popdown">$check};
168                                                  $after .= '<code>' . $attr->$getter->dump . '</code>' if $getter ne $check;                                                  # we need dump here instead of $attr->$getter->dump because default can return scalar
169                                                    $after .= '<code>' . dump( $attr->$getter ) . '</code>' if $getter ne $check;
170                                                  $after .= '</span>';                                                  $after .= '</span>';
171                                          }                                          }
172                                  }                                  }
# Line 214  warn $attr->dump(3); Line 215  warn $attr->dump(3);
215          my $pod = Frey::Pod->new( class => $class )->markup;          my $pod = Frey::Pod->new( class => $class )->markup;
216    
217          use Frey::Run;          use Frey::Run;
218          my $execute = join("\n", map { qq|<a href="/$_/$class">$_</a>| } grep { $class->can($_) } Frey::Run->execute );          my $execute = join("\n", map { qq|<a href="/$class/$_">$_</a>| } grep { $class->can($_) } Frey::Run->execute );
219          $execute = " execute: $execute" if $execute;          $execute = " execute: $execute" if $execute;
220    
221          my $html = $self->page(          my $html = $self->page(

Legend:
Removed from v.243  
changed lines
  Added in v.254

  ViewVC Help
Powered by ViewVC 1.1.26