--- trunk/lib/Frey/Introspect.pm 2008/11/05 08:20:44 270 +++ trunk/lib/Frey/Introspect.pm 2008/11/05 08:20:59 288 @@ -77,7 +77,7 @@ $out .= "\t\t},\n\t\tmeta: Frey.HTML, classMethods: { renderHTML: function () { - return new Joose.SimpleRequest().getText(\"/~/" . $self->class . "\") + return new Joose.SimpleRequest().getText(\"/Frey-Introspect?class=" . $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,7 +165,8 @@ $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 .= ''; } } @@ -191,7 +192,7 @@ join(', ', map { my $name = $_->meta->name; - qq|$name| . $_->meta->dump(2) . qq||; + qq|$name| . $_->meta->dump(2) . qq||; } #grep { $_ ne 'Moose::Object' } $meta->superclasses @@ -204,7 +205,7 @@ grep { ! m/\Q$class\E/ } # skip me map { my $name = $_->name; - qq|$name| . $name->meta->dump(2) . qq||; + qq|$name| . $name->meta->dump(2) . qq||; } $meta->calculate_all_roles ); @@ -214,7 +215,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(