From: Sebastian Riedel Date: Tue, 5 Jul 2005 11:32:15 +0000 (+0000) Subject: Fixed $Data::Dumper::Terse X-Git-Tag: 5.7099_04~1273 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=62d9b03003fb7bc4be52d27b67cf0edcaaf18162 Fixed $Data::Dumper::Terse --- diff --git a/Changes b/Changes index 6ae9fba..c10b983 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ This file documents the revision history for Perl extension Catalyst. +5.31 2005-06-04 12:35:00 + + - fixed $Data::Dumper::Terse (Robin Berjon) + 5.30 2005-06-04 12:35:00 - Fixed a bug where it was not possible to $c->forward to a diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 7c7717e..2c6ca19 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -13,7 +13,7 @@ our $CATALYST_SCRIPT_GEN = 4; __PACKAGE__->mk_classdata($_) for qw/arguments dispatcher engine log/; -our $VERSION = '5.30'; +our $VERSION = '5.31'; our @ISA; =head1 NAME diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index 8a0d54c..de7e082 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -16,9 +16,6 @@ use Catalyst::Request::Upload; use Catalyst::Response; use Catalyst::Utils; -# For pretty dumps -$Data::Dumper::Terse = 1; - __PACKAGE__->mk_classdata('components'); __PACKAGE__->mk_accessors(qw/counter depth request response state/); @@ -286,7 +283,12 @@ sub finalize_error { my ( $title, $error, $infos ); if ( $c->debug ) { - $error = join '', map { '' . encode_entities($_) . '' } @{ $c->error }; + + # For pretty dumps + local $Data::Dumper::Terse = 1; + $error = join '', + map { '' . encode_entities($_) . '' } + @{ $c->error }; $error ||= 'No output'; $title = $name = "$name on Catalyst $Catalyst::VERSION"; my $req = encode_entities Dumper $c->req; @@ -422,7 +424,8 @@ sub handler { $t->setColWidth( 'Time', 9, 1 ); for my $stat (@stats) { $t->addRow( $stat->[0], $stat->[1] ) } - $class->log->info( "Request took ${elapsed}s ($av/s)\n" . $t->draw ); + $class->log->info( + "Request took ${elapsed}s ($av/s)\n" . $t->draw ); } else { $status = &$handler }