Add comment about possible warnings in Template::Base and log levels
[catagits/Catalyst-Manual.git] / lib / Catalyst / Manual / Tutorial / Debugging.pod
index 5cf5b6a..22d7286 100644 (file)
@@ -1,11 +1,11 @@
 =head1 NAME
 
-Catalyst::Manual::Tutorial::Debugging - Catalyst Tutorial - Part 7: Debugging
+Catalyst::Manual::Tutorial::Debugging - Catalyst Tutorial - Chapter 7: Debugging
 
 
 =head1 OVERVIEW
 
-This is B<Part 7 of 10> for the Catalyst tutorial.
+This is B<Chapter 7 of 10> for the Catalyst tutorial.
 
 L<Tutorial Overview|Catalyst::Manual::Tutorial>
 
@@ -56,7 +56,7 @@ L<Appendices|Catalyst::Manual::Tutorial::Appendices>
 
 =head1 DESCRIPTION
 
-This part of the tutorial takes a brief look at the primary options
+This chapter of the tutorial takes a brief look at the primary options 
 available for troubleshooting Catalyst applications.
 
 Note that when it comes to debugging and troubleshooting, there are two
@@ -93,6 +93,16 @@ template view use:
 
     [% c.log.debug("This is a test log message") %]
 
+As with many other logging facilities, you a method is defined for
+each of the following "logging levels" (in increasing order of
+severity/importance):
+
+    $c->log->debug
+    $c->log->info
+    $c->log->warn
+    $c->log->error
+    $c->log->fatal
+
 You can also use L<Data::Dumper|Data::Dumper> in both Catalyst code 
 (C<use Data::Dumper; $c-E<gt>log-E<gt>debug("\$var is: ".Dumper($var));)>) 
 and TT templates (C<[% Dumper.dump(book) %]>.
@@ -139,12 +149,12 @@ This will start the interactive debugger and produce output similar to:
 
     $ perl -d script/myapp_server.pl  
     
-    Loading DB routines from perl5db.pl version 1.27
+    Loading DB routines from perl5db.pl version 1.3
     Editor support available.
     
     Enter h or `h h' for help, or `man perldebug' for more help.
     
-    main::(script/myapp_server.pl:14):      my $debug         = 0;
+    main::(script/myapp_server.pl:16):      my $debug         = 0;
     
       DB<1> 
 
@@ -158,8 +168,8 @@ in.  Once the breakpoint is encountered in the
 C<MyApp::Controller::list> method, the console session running the
 development server will drop to the Perl debugger prompt:
 
-    MyApp::Controller::Books::list(/home/me/MyApp/script/../lib/MyApp/Controller/Books.pm:40):
-    40:         $c->stash->{books} = [$c->model('DB::Books')->all];
+    MyApp::Controller::Books::list(/home/me/MyApp/script/../lib/MyApp/Controller/Books.pm:48):
+    48:         $c->stash->{books} = [$c->model('DB::Books')->all];
     
       DB<1>
 
@@ -170,8 +180,8 @@ C<single-step> into methods/subroutines):
 
       DB<1> n
     SELECT me.id, me.authors, me.title, me.rating FROM books me:
-    MyApp::Controller::Books::list(/home/me/MyApp/script/../lib/MyApp/Controller/Books.pm:44):
-    44:         $c->stash->{template} = 'books/list.tt2';
+    MyApp::Controller::Books::list(/home/me/MyApp/script/../lib/MyApp/Controller/Books.pm:53):
+    53:         $c->stash->{template} = 'books/list.tt2';
     
       DB<1>
 
@@ -185,15 +195,11 @@ Next, list the methods available on our C<Book> model:
     ()
     (0+
     (bool
-    MODIFY_CODE_ATTRIBUTES
-    _attr_cache
-    _collapse_result
-    _construct_object
-    _count
-    _result_class_accessor
-    _result_source_accessor
-    all
-    carp
+    __source_handle_accessor
+    _add_alias
+    _build_unique_query
+    _calculate_score
+    _collapse_cond
     <lines removed for brevity>
     
       DB<2>
@@ -258,9 +264,9 @@ copy of an installed module:
 
     mkdir -p lib/Module; cp `perldoc -l Module::Name` lib/Module/
 
-Note: If you are following along in Ubuntu, you will need to install
+Note: If you are following along in Debian 5, you will need to install
 the C<perl-doc> package to use the C<perldoc> command.  Use 
-C<sudo apt-get install perl-doc> to do that.
+C<sudo aptitude install perl-doc> to do that.
 
 For example, you could make a copy of 
 L<Catalyst::Plugin::Authentication|Catalyst::Plugin::Authentication>
@@ -337,7 +343,7 @@ Kennedy Clark, C<hkclark@gmail.com>
 
 Please report any errors, issues or suggestions to the author.  The
 most recent version of the Catalyst Tutorial can be found at
-L<http://dev.catalyst.perl.org/repos/Catalyst/trunk/Catalyst-Manual/lib/Catalyst/Manual/Tutorial/>.
+L<http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/Tutorial/>.
 
 Copyright 2006-2008, Kennedy Clark, under Creative Commons License
 (L<http://creativecommons.org/licenses/by-sa/3.0/us/>).