--- trunk/lib/Frey/Introspect.pm 2008/07/16 00:06:19 140
+++ trunk/lib/Frey/Introspect.pm 2008/10/28 21:24:07 198
@@ -138,8 +138,7 @@
sub html {
my ( $self, $request ) = @_;
- $self->add_css( 'static/introspect.css' );
- warn "## css = ",dump( $self->css );
+ $self->add_head( 'static/introspect.css' );
while (1) {
@@ -156,11 +155,28 @@
my $attr = $meta->get_attribute($_);
my ( $before, $title, $after ) = ( '', '', '' );
( $before, $title, $after ) = ( '', ' title="required"', '' ) if $attr->is_required;
- qq|
$before$_$after | |
+warn $attr->dump(3);
+ 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/ ) {
+ my $getter;
+
+ $getter = $check;
+ $getter =~ s/^has_//;
+
+ if ( $attr->$check ) {
+ if ( $getter eq $check ) {
+ $after .= "$check ";
+ } else {
+ $after .= qq{';
+ }
+ }
+ }
+ qq|$before$_ | $after | |
} sort $meta->get_attribute_list
}
- my $table = qq|Methods | Attributes |
|;
+ my $table = qq|Methods | Attributes | Properties |
|;
while ( @methods || @attributes ) {
my ($m,$a) = ( shift @methods, shift @attributes );
$m ||= ' | ';
@@ -179,7 +195,10 @@
if ( $meta->superclasses ) {
$superclasses = 'Superclasses: ' .
join(', ',
- map { my $s = $_->meta->name; qq|$s| }
+ map {
+ my $name = $_->meta->name;
+ qq||;
+ }
#grep { $_ ne 'Moose::Object' }
$meta->superclasses
);