[Catalyst-commits] r9979 - Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/Tutorial

hkclark at dev.catalyst.perl.org hkclark at dev.catalyst.perl.org
Fri May 1 22:20:43 GMT 2009


Author: hkclark
Date: 2009-05-01 22:20:43 +0000 (Fri, 01 May 2009)
New Revision: 9979

Modified:
   Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/Tutorial/Debugging.pod
   Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/Tutorial/Testing.pod
Log:
Add comment about possible warnings in Template::Base and log levels

Modified: Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/Tutorial/Debugging.pod
===================================================================
--- Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/Tutorial/Debugging.pod	2009-05-01 04:55:09 UTC (rev 9978)
+++ Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/Tutorial/Debugging.pod	2009-05-01 22:20:43 UTC (rev 9979)
@@ -93,6 +93,16 @@
 
     [% 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) %]>.

Modified: Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/Tutorial/Testing.pod
===================================================================
--- Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/Tutorial/Testing.pod	2009-05-01 04:55:09 UTC (rev 9978)
+++ Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/Tutorial/Testing.pod	2009-05-01 22:20:43 UTC (rev 9979)
@@ -116,6 +116,29 @@
 
     $ 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>




More information about the Catalyst-commits mailing list