--- trunk/lib/Frey/Introspect.pm 2008/11/05 08:20:50 277 +++ trunk/lib/Frey/Introspect.pm 2008/11/05 08:21:01 290 @@ -154,7 +154,7 @@ my ( $before, $title, $after ) = ( '', '', '' ); ( $before, $title, $after ) = ( '', ' title="required"', '' ) if $attr->is_required; 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/ ) { + 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 $getter; $getter = $check; @@ -165,17 +165,19 @@ $after .= "$check"; } else { $after .= qq{$check}; - $after .= '' . $attr->$getter->dump . '' if $getter ne $check; + # we need dump here instead of $attr->$getter->dump because default can return scalar + $after .= '' . dump( $attr->$getter ) . '' if $getter ne $check; $after .= ''; } } $after .= ' '; } - qq|$before $_$after| + my $type = $attr->has_type_constraint ? $attr->type_constraint->name : ''; + qq|$before $_$type$after| } sort $meta->get_attribute_list } - my $table = qq||; + my $table = qq|
MethodsAttributesProperties
|; while ( @methods || @attributes ) { my ($m,$a) = ( shift @methods, shift @attributes ); $m ||= ''; @@ -214,7 +216,7 @@ my $pod = Frey::Pod->new( class => $class )->markup; use Frey::Run; - my $execute = join("\n", map { qq|$_| } grep { $class->can($_) } Frey::Run->execute ); + my $execute = join("\n", map { qq|$_| } grep { $class->can($_) } Frey::Run->execute ); $execute = " execute: $execute" if $execute; my $html = $self->page(
MethodsAttributesTypeProperties