Add comment about possible warnings in Template::Base and log levels
Kennedy Clark [Fri, 1 May 2009 22:20:43 +0000 (22:20 +0000)]
lib/Catalyst/Manual/Tutorial/Debugging.pod
lib/Catalyst/Manual/Tutorial/Testing.pod

index a7e175a..22d7286 100644 (file)
@@ -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) %]>.
index 2fe879a..eb67ebb 100644 (file)
@@ -116,6 +116,29 @@ environment variable.  For example:
 
     $ CATALYST_DEBUG=0 prove --lib lib t
 
+B<Note:> Depending on the versions of various modules you have 
+installed, you might get some C<used only once> warnings -- you can 
+ignore these.  If you want to elliminate the warnings, you can 
+edit C<Template::Base> to disable and then re-enable warnings
+are the C</usr/lib/perl5/Template/Base.pm> line in C<sub new>.
+You can locate where C<Template::Base> is located with the 
+following command (it's probably in a place similar to
+C</usr/lib/perl5/Template/Base.pm>):
+
+    perldoc -l Template::Base
+
+Edit the file and modify C<sub new> to match:
+
+    ...
+    {   no strict qw( refs );
+        # Disable warnings
+        no warnings;
+        $argnames = \@{"$class\::BASEARGS"} || [ ];
+        # Turn warnings back on
+        use warnings;
+    }
+    ...
+
 During the C<t/02pod> and C<t/03podcoverage> tests, you might notice the
 C<all skipped: set TEST_POD to enable this test> warning message.  To
 execute the Pod-related tests, add C<TEST_POD=1> to the C<prove>