[Catalyst-commits] r11143 - in
Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib:
. TestAppStats TestAppStats/Controller
yousef at dev.catalyst.perl.org
yousef at dev.catalyst.perl.org
Sun Aug 16 18:08:07 GMT 2009
Author: yousef
Date: 2009-08-16 18:08:03 +0000 (Sun, 16 Aug 2009)
New Revision: 11143
Added:
Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppStats/
Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppStats/Controller/
Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppStats/Controller/Root.pm
Removed:
Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppPathBug/
Modified:
Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppPathBug.pm
Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppStats.pm
Log:
Returned the foo() action to TestAppPathBug.pm so it tests the right bug. Added a signal handler to silence the warning. Moved action methods from TestAppStats.pm to a root controller.
Modified: Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppPathBug.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppPathBug.pm 2009-08-16 12:16:12 UTC (rev 11142)
+++ Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppPathBug.pm 2009-08-16 18:08:03 UTC (rev 11143)
@@ -3,6 +3,8 @@
package TestAppPathBug;
+BEGIN { $SIG{__WARN__} = sub {}; };
+
use Catalyst;
our $VERSION = '0.01';
@@ -11,4 +13,9 @@
__PACKAGE__->setup;
+sub foo : Path {
+ my ( $self, $c ) = @_;
+ $c->res->body( 'This is the foo method.' );
+}
+
1;
Added: Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppStats/Controller/Root.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppStats/Controller/Root.pm (rev 0)
+++ Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppStats/Controller/Root.pm 2009-08-16 18:08:03 UTC (rev 11143)
@@ -0,0 +1,16 @@
+package TestAppStats::Controller::Root;
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+__PACKAGE__->config->{namespace} = '';
+
+# Return log messages from previous request
+sub default : Private {
+ my ( $self, $c ) = @_;
+ $c->stats->profile("test");
+ $c->res->body(join("\n", @TestAppStats::log_messages));
+ @TestAppStats::log_messages = ();
+}
+
+1;
Modified: Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppStats.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppStats.pm 2009-08-16 12:16:12 UTC (rev 11142)
+++ Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppStats.pm 2009-08-16 18:08:03 UTC (rev 11143)
@@ -16,16 +16,8 @@
__PACKAGE__->setup;
-# Return log messages from previous request
-sub default : Private {
- my ( $self, $c ) = @_;
- $c->stats->profile("test");
- $c->res->body(join("\n", @log_messages));
- @log_messages = ();
-}
-
package TestAppStats::Log;
use base qw/Catalyst::Log/;
-sub info { push(@log_messages, @_); }
-sub debug { push(@log_messages, @_); }
+sub info { push(@TestAppStats::log_messages, @_); }
+sub debug { push(@TestAppStats::log_messages, @_); }
More information about the Catalyst-commits
mailing list