/[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 288 by dpavlin, Wed Nov 5 08:20:59 2008 UTC revision 292 by dpavlin, Wed Nov 5 08:21:03 2008 UTC
# Line 77  sub joose { Line 77  sub joose {
77          $out .= "\t\t},\n\t\tmeta: Frey.HTML,          $out .= "\t\t},\n\t\tmeta: Frey.HTML,
78                  classMethods: {                  classMethods: {
79                          renderHTML: function () {                          renderHTML: function () {
80                                  return new Joose.SimpleRequest().getText(\"/Frey-Introspect?class=" . $self->class . "\")                                  return new Joose.SimpleRequest().getText(\"/" . $self->class . "\")
81                          },\n";                          },\n";
82    
83          $out .= "\t\t},\n";          $out .= "\t\t},\n";
# Line 172  warn $attr->dump(3); Line 172  warn $attr->dump(3);
172                                  }                                  }
173                                  $after .= ' ';                                  $after .= ' ';
174                          }                          }
175                          qq|<td class="a">$before $_</td><td>$after</td>|                          my $type = $attr->has_type_constraint ? $attr->type_constraint->name : '';
176                            qq|<td class="a">$before $_</td><td class="t">$type</td><td>$after</td>|
177                  } sort $meta->get_attribute_list                  } sort $meta->get_attribute_list
178          }          }
179    
180          my $table = qq|<table class="frey-object-browser"><tr><th class="m">Methods</th><th class="a">Attributes</th><th class="p">Properties</th></tr>|;          my $table = qq|<table class="frey-object-browser"><tr><th class="m">Methods</th><th class="a">Attributes</th><th>Type</th><th class="p">Properties</th></tr>|;
181          while ( @methods || @attributes ) {          while ( @methods || @attributes ) {
182                  my ($m,$a) = ( shift @methods, shift @attributes );                  my ($m,$a) = ( shift @methods, shift @attributes );
183                  $m ||= '<td></td>';                  $m ||= '<td></td>';
# Line 192  warn $attr->dump(3); Line 193  warn $attr->dump(3);
193                                  join(', ',                                  join(', ',
194                                          map {                                          map {
195                                                  my $name = $_->meta->name;                                                  my $name = $_->meta->name;
196                                                  qq|<a class="frey-popdown" href="/Frey-Introspect?class=$name">$name<code>| . $_->meta->dump(2) . qq|</code></a>|;                                                  qq|<a class="frey-popdown" href="/$name">$name<code>| . $_->meta->dump(2) . qq|</code></a>|;
197                                          }                                          }
198                                          #grep { $_ ne 'Moose::Object' }                                          #grep { $_ ne 'Moose::Object' }
199                                          $meta->superclasses                                          $meta->superclasses
# Line 205  warn $attr->dump(3); Line 206  warn $attr->dump(3);
206                          grep { ! m/\Q$class\E/ }        # skip me                          grep { ! m/\Q$class\E/ }        # skip me
207                          map {                          map {
208                                  my $name = $_->name;                                  my $name = $_->name;
209                                  qq|<a class="frey-popdown" href="/Frey-Introspect?class=$name">$name<code>| . $name->meta->dump(2) . qq|</code></a>|;                                  qq|<a class="frey-popdown" href="/$name">$name<code>| . $name->meta->dump(2) . qq|</code></a>|;
210                          }                          }
211                          $meta->calculate_all_roles                          $meta->calculate_all_roles
212                  );                  );

Legend:
Removed from v.288  
changed lines
  Added in v.292

  ViewVC Help
Powered by ViewVC 1.1.26