/[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 943 by dpavlin, Tue Jan 6 14:50:30 2009 UTC revision 1017 by dpavlin, Sun Jan 25 16:32:53 2009 UTC
# Line 60  sub joose { Line 60  sub joose {
60                  $out .= "\t\t\t$_: {\n";                  $out .= "\t\t\t$_: {\n";
61    
62                  my $attr = $meta->get_attribute($_);                  my $attr = $meta->get_attribute($_);
63                  my $is = $attr->_is_metadata;                  my $is = eval { $attr->_is_metadata; };
64                    return if $@;
65    
66                  $out .= "\t\t\t\tis: \"$is\",\n" if defined $is;                  $out .= "\t\t\t\tis: \"$is\",\n" if defined $is;
67                  $out .= "\t\t\t\tlazy: true,\n" if $attr->is_lazy;                  $out .= "\t\t\t\tlazy: true,\n" if $attr->is_lazy;
68                  $out .= "\t\t\t\trequired: true,\n" if $attr->is_required;                  $out .= "\t\t\t\trequired: true,\n" if $attr->is_required;
# Line 316  sub as_markup { Line 318  sub as_markup {
318    
319          $self->store( $introspect_path, $introspect );          $self->store( $introspect_path, $introspect );
320    
321            $self->add_css(qq|
322                    .right {
323                            position: fixed;
324                            top: 1em;
325                            right: 1em;
326                            z-index: 10;
327                            background: #fff;
328                            padding: 0.2em;
329                            border: 1px dashed #ee8;
330                    }
331            |);
332    
333            my $right = join('<br>',
334                    grep { $_ } (
335                            $runnable,
336                            $has_tests,
337                            $pod    ? qq|<a class="frey-skip" href="#___top" title="Skip to POD"    >pod</a>|    : '',
338                            $source ? qq|<a class="frey-skip" href="#source" title="Skip to source" >source</a>| : '',
339                    )
340            );
341          return join("\n",          return join("\n",
342                  qq|<h1>$class</h1>|,                  qq|
343                  qq|<div class="frey-introspect">                          <h1>$class</h1>
344                          $superclasses $roles                          <div class="frey-introspect">
345                          <br>                                  $superclasses $roles
346                          $includes                                  <br>$includes
347                          <br>                          </div>
348                          $runnable                          <div class="right">
349                                    $right
350                            </div>
351                            $table
352                            $pod
353                            </div>
354    
355                            <h1>Source</h1><a name="source"></a>
356                            <div class="frey-source">$source</div>
357                  |,                  |,
                 $has_tests,  
                 $pod    ? qq|<a class="frey-skip" href="#___top" title="Skip to POD"    >pod</a>|    : '',  
                 $source ? qq|<a class="frey-skip" href="#source" title="Skip to source" >source</a>| : '',  
                 qq|$table\n$pod\n</div>\n|,  
                 qq|<h1>Source</h1><a name="source"></a><div class="frey-source">$source</div>|,  
358          );          );
359  }  }
360    

Legend:
Removed from v.943  
changed lines
  Added in v.1017

  ViewVC Help
Powered by ViewVC 1.1.26