# This is fugly, but the metaclass is _HUGE_ and demands waaay too much
# scrolling. Suggestions for more pleasant ways to do this welcome.
local $val->{'__MOP__'} = "Stringified: "
- . $val->{'__MOP__'} if exists $val->{'__MOP__'};
+ . $val->{'__MOP__'} if ref $val eq 'HASH' && exists $val->{'__MOP__'};
my $text = encode_entities( dump( $val ));
sprintf <<"EOF", $name, $text;
</html>
- # Trick IE
+ # Trick IE. Old versions of IE would display their own error page instead
+ # of ours if we'd give it less than 512 bytes.
$c->res->{body} .= ( ' ' x 512 );
# Return 500