updated debug dump.
more docs
- Fix pod to use DBIC::Schema instead of DBIC model
- Fix ->config failing to copy _config for subclassing
- ConfigLoader: Updated to version 0.07
+ - Updated log format
+ - Updated debug dump
5.6902 2006-05-04 13:00:00
- Remove tarballs and OSX metadata files.
requires 'Carp';
requires 'Class::Accessor::Fast';
requires 'Class::Data::Inheritable';
-requires 'Class::Inspector';
+requires 'Class::Inspector' => '1.06';
requires 'CGI::Cookie';
+requires 'Data::Dump';
requires 'File::Modified';
requires 'HTML::Entities';
requires 'HTTP::Body' => 0.5;
Install Task::Catalyst to get everything you need to start writing
serious applications with Catalyst.
+ Note that Catalyst::Helper has been split into a separate distribution,
+ and is required for using catalyst.pl to make new distributions. It is
+ included with Task::Catalyst
+
perl -MCPANPLUS -e 'install Task::Catalyst'
perl -MCPAN -e 'install Task::Catalyst'
use utf8;
use Carp qw/croak/;
+BEGIN { require 5.008001; }
+
__PACKAGE__->mk_accessors(
qw/counter request response state action stack namespace stats/
);
use strict;
use base 'Class::Accessor::Fast';
use CGI::Cookie;
-use Data::Dumper;
+use Data::Dump qw/dump/;
use HTML::Entities;
use HTTP::Body;
use HTTP::Headers;
if ( $c->debug ) {
# For pretty dumps
- local $Data::Dumper::Terse = 1;
$error = join '', map {
'<p><code class="error">'
. encode_entities($_)
# Don't show response header state in dump
delete $c->res->{_finalized_headers};
- my $req = _fixup_debug_info($c->req);
- my $res = _fixup_debug_info($c->res);
- my $stash = _fixup_debug_info($c->stash);
-
my @infos;
my $i = 0;
for my $dump ( $c->dump_these ) {
my $name = $dump->[0];
- my $value = encode_entities( Dumper $dump->[1] );
+ my $value = encode_entities( dump( $dump->[1] ));
push @infos, sprintf <<"EOF", $name, $value;
<h2><a href="#" onclick="toggleDump('dump_$i'); return false">%s</a></h2>
<div id="dump_$i">
print STDOUT $buffer;
}
-sub _fixup_debug_info {
- my $info = encode_entities Dumper shift;
- my @info = split "\n", $info;
- pop @info; shift @info;
- return join "\n",@info;
-}
=head2 $self->finalize_output
use strict;
use base 'Class::Accessor::Fast';
-use Data::Dumper;
+use Data::Dump;
our %LEVELS = ();
sub _dump {
my $self = shift;
- local $Data::Dumper::Terse = 1;
- $self->info( Dumper(@_) );
+ $self->info( Data::Dump::dump(@_) );
}
sub _log {
By default, Catalyst will display its own error page whenever it
encounters an error in your application. When running under C<-Debug>
mode, the error page is a useful screen including the error message and
-a full Data::Dumper output of the C<$c> context object. When not in
-C<-Debug>, users see a simple "Please come back later" screen.
+L<Data::Dump> output of the relevant parts of the C<$c> context object.
+When not in C<-Debug>, users see a simple "Please come back later" screen.
To use a custom error page, use a special C<end> method to short-circuit
the error processing. The following is an example; you might want to
If you want to output any debugging information to the console, then
call C<< $c->log->debug() >>, passing it a string to output. For data
-structures, C<use> L<Data::Dumper> and call C<<
-$c->log->debug(Dumper($structure)) >>
+structures, C<use> L<Data::Dump> qw/dump/; and call
+C<< $c->log->debug(dump($structure)) >>
=head2 Model/View/Controller