--- trunk/lib/Frey/Introspect.pm 2008/11/05 08:20:51 278
+++ trunk/lib/Frey/Introspect.pm 2008/11/05 08:21:03 292
@@ -77,7 +77,7 @@
$out .= "\t\t},\n\t\tmeta: Frey.HTML,
classMethods: {
renderHTML: function () {
- return new Joose.SimpleRequest().getText(\"/Frey-Introspect?class=" . $self->class . "\")
+ return new Joose.SimpleRequest().getText(\"/" . $self->class . "\")
},\n";
$out .= "\t\t},\n";
@@ -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|Methods | Attributes | Properties |
|;
+ my $table = qq|