X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FTutorial%2FDebugging.pod;h=90222e96f1dd7e58b1b650a1acda2d97fa4c2adb;hp=e885ec9c3b26e024e3134e39d942ab348a07829a;hb=d04961970a25ec3dc831f89be5cd6e27fdec884a;hpb=cae937d8319d60d4bae9378f5263770dbd9b7d7b diff --git a/lib/Catalyst/Manual/Tutorial/Debugging.pod b/lib/Catalyst/Manual/Tutorial/Debugging.pod index e885ec9..90222e9 100644 --- a/lib/Catalyst/Manual/Tutorial/Debugging.pod +++ b/lib/Catalyst/Manual/Tutorial/Debugging.pod @@ -1,10 +1,11 @@ =head1 NAME -Catalyst::Manual::Tutorial::Debugging - Catalyst Tutorial - Part 6: Debugging +Catalyst::Manual::Tutorial::Debugging - Catalyst Tutorial - Part 7: Debugging + =head1 OVERVIEW -This is B for the Catalyst tutorial. +This is B for the Catalyst tutorial. L @@ -20,30 +21,34 @@ L =item 3 -L +L =item 4 -L +L =item 5 -L +L =item 6 -B +L =item 7 -L +B =item 8 -L +L =item 9 +L + +=item 10 + L =back @@ -88,7 +93,7 @@ view use: [% Catalyst.log.debug("This is a test log message") %] You can also use L in both Catalyst code -(Clog-Edebug("$var is: ".Dumper($var));)>) +(Clog-Edebug("\$var is: ".Dumper($var));)>) and TT templates (C<[% Dumper.dump(book) %]>. =head1 RUNNING CATALYST UNDER THE PERL DEBUGGER @@ -102,7 +107,7 @@ C line as follows inside the C method (I like to you can obviously indent them if you prefer): sub list : Local { - # Retrieve the usual perl OO '$self' for this object. $c is the Catalyst + # Retrieve the usual Perl OO '$self' for this object. $c is the Catalyst # 'Context' that's used to 'glue together' the various components # that make up the application my ($self, $c) = @_; @@ -111,7 +116,7 @@ you can obviously indent them if you prefer): # Retrieve all of the book records as book model objects and store in the # stash where they can be accessed by the TT template - $c->stash->{books} = [$c->model('MyAppDB::Book')->all]; + $c->stash->{books} = [$c->model('DB::Books')->all]; # Set the TT template to use. You will almost always want to do this # in your action methods. @@ -121,6 +126,8 @@ you can obviously indent them if you prefer): This causes the Perl Debugger to enter "single step mode" when this command is encountered (it has no effect when Perl is run without the C<-d> flag). +B The C here is the Perl Debugger, not the DB model. + To now run the Catalyst development server under the Perl debugger, simply prepend C to the front of C