--- trunk/lib/Frey/Introspect.pm 2008/11/26 19:43:03 543 +++ trunk/lib/Frey/Introspect.pm 2008/11/28 13:18:18 582 @@ -155,12 +155,16 @@ if ( $meta->get_attribute_list ) { @attributes = map { my $name = $_; + my $html_name = $name; my $attr = $meta->get_attribute($name); confess "$class attribute $name isn't blessed ",dump( $attr ) unless blessed $attr; warn "## attr $name ref ",ref( $attr ) if $self->debug; - my ( $before, $title, $after ) = ( '', '', '' ); - ( $before, $title, $after ) = ( '', ' title="required"', '' ) if $attr->can('is_required') && $attr->is_required; - 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/ ) { + + my ( $title, $properties ) = ( '', '' ); + ( $html_name, $title ) = ( "$name", ' title="required"' ) + if $attr->can('is_required') && $attr->is_required; + + 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_applied_traits/ ) { my $getter; $getter = $check; @@ -168,13 +172,13 @@ if ( $attr->can($check) && $attr->$check ) { if ( $getter eq $check ) { - $after .= "$check"; + $properties .= "$check"; } else { # we need our dump here instead of $attr->$getter->dump because default can return scalar - $after .= $self->dropdown( $check, $attr->$getter ); + $properties .= $self->dropdown( $check, $attr->$getter ); } } - $after .= ' '; + $properties .= ' '; } my $type = $attr->can('has_type_constraint') && $attr->has_type_constraint ? $attr->type_constraint->name : ''; @@ -183,7 +187,9 @@ $name .= qq|$nr|; } - qq|$before $name$type$after| + eval { $properties = $attr->documentation }; + + qq|$html_name$type$properties| } $meta->get_attribute_list }