[Catalyst-commits] r11602 - in
Catalyst-Plugin-Session-Store-DBI/trunk/t/lib: . TestApp
TestApp/Controller TestAppDBIC TestAppDBIC/Controller
TestAppDBICSchema TestAppDBICSchema/Controller
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Sat Oct 17 17:23:58 GMT 2009
Author: rafl
Date: 2009-10-17 17:23:58 +0000 (Sat, 17 Oct 2009)
New Revision: 11602
Added:
Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestApp/
Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestApp/Controller/
Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestApp/Controller/Root.pm
Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBIC/Controller/
Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBIC/Controller/Root.pm
Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBICSchema/Controller/
Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBICSchema/Controller/Root.pm
Modified:
Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestApp.pm
Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBIC.pm
Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBICSchema.pm
Log:
Move testapp actions into controllers.
Copied: Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestApp/Controller/Root.pm (from rev 11601, Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBIC.pm)
===================================================================
--- Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestApp/Controller/Root.pm (rev 0)
+++ Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestApp/Controller/Root.pm 2009-10-17 17:23:58 UTC (rev 11602)
@@ -0,0 +1,34 @@
+use strict;
+use warnings;
+
+package TestApp::Controller::Root;
+
+use base 'Catalyst::Controller';
+
+__PACKAGE__->config(namespace => '');
+
+sub login : Global {
+ my ( $self, $c ) = @_;
+ $c->session;
+ $c->res->output('logged in');
+}
+
+sub logout : Global {
+ my ( $self, $c ) = @_;
+ $c->res->output(
+ 'logged out after ' . $c->session->{counter} . ' requests' );
+ $c->delete_session('logout');
+}
+
+sub page : Global {
+ my ( $self, $c ) = @_;
+ if ( $c->sessionid ) {
+ $c->res->output('you are logged in');
+ $c->session->{counter}++;
+ }
+ else {
+ $c->res->output('please login');
+ }
+}
+
+1;
Modified: Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestApp.pm
===================================================================
--- Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestApp.pm 2009-10-17 17:15:18 UTC (rev 11601)
+++ Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestApp.pm 2009-10-17 17:23:58 UTC (rev 11602)
@@ -17,28 +17,4 @@
__PACKAGE__->setup(qw/Session Session::Store::DBI Session::State::Cookie/);
-sub login : Global {
- my ( $self, $c ) = @_;
- $c->session;
- $c->res->output('logged in');
-}
-
-sub logout : Global {
- my ( $self, $c ) = @_;
- $c->res->output(
- 'logged out after ' . $c->session->{counter} . ' requests' );
- $c->delete_session('logout');
-}
-
-sub page : Global {
- my ( $self, $c ) = @_;
- if ( $c->sessionid ) {
- $c->res->output('you are logged in');
- $c->session->{counter}++;
- }
- else {
- $c->res->output('please login');
- }
-}
-
1;
Copied: Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBIC/Controller/Root.pm (from rev 11601, Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBIC.pm)
===================================================================
--- Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBIC/Controller/Root.pm (rev 0)
+++ Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBIC/Controller/Root.pm 2009-10-17 17:23:58 UTC (rev 11602)
@@ -0,0 +1,34 @@
+use strict;
+use warnings;
+
+package TestAppDBIC::Controller::Root;
+
+use base 'Catalyst::Controller';
+
+__PACKAGE__->config(namespace => '');
+
+sub login : Global {
+ my ( $self, $c ) = @_;
+ $c->session;
+ $c->res->output('logged in');
+}
+
+sub logout : Global {
+ my ( $self, $c ) = @_;
+ $c->res->output(
+ 'logged out after ' . $c->session->{counter} . ' requests' );
+ $c->delete_session('logout');
+}
+
+sub page : Global {
+ my ( $self, $c ) = @_;
+ if ( $c->sessionid ) {
+ $c->res->output('you are logged in');
+ $c->session->{counter}++;
+ }
+ else {
+ $c->res->output('please login');
+ }
+}
+
+1;
Modified: Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBIC.pm
===================================================================
--- Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBIC.pm 2009-10-17 17:15:18 UTC (rev 11601)
+++ Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBIC.pm 2009-10-17 17:23:58 UTC (rev 11602)
@@ -16,28 +16,4 @@
__PACKAGE__->setup(qw/Session Session::Store::DBI Session::State::Cookie/);
-sub login : Global {
- my ( $self, $c ) = @_;
- $c->session;
- $c->res->output('logged in');
-}
-
-sub logout : Global {
- my ( $self, $c ) = @_;
- $c->res->output(
- 'logged out after ' . $c->session->{counter} . ' requests' );
- $c->delete_session('logout');
-}
-
-sub page : Global {
- my ( $self, $c ) = @_;
- if ( $c->sessionid ) {
- $c->res->output('you are logged in');
- $c->session->{counter}++;
- }
- else {
- $c->res->output('please login');
- }
-}
-
1;
Copied: Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBICSchema/Controller/Root.pm (from rev 11601, Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBIC.pm)
===================================================================
--- Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBICSchema/Controller/Root.pm (rev 0)
+++ Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBICSchema/Controller/Root.pm 2009-10-17 17:23:58 UTC (rev 11602)
@@ -0,0 +1,34 @@
+use strict;
+use warnings;
+
+package TestAppDBICSchema::Controller::Root;
+
+use base 'Catalyst::Controller';
+
+__PACKAGE__->config(namespace => '');
+
+sub login : Global {
+ my ( $self, $c ) = @_;
+ $c->session;
+ $c->res->output('logged in');
+}
+
+sub logout : Global {
+ my ( $self, $c ) = @_;
+ $c->res->output(
+ 'logged out after ' . $c->session->{counter} . ' requests' );
+ $c->delete_session('logout');
+}
+
+sub page : Global {
+ my ( $self, $c ) = @_;
+ if ( $c->sessionid ) {
+ $c->res->output('you are logged in');
+ $c->session->{counter}++;
+ }
+ else {
+ $c->res->output('please login');
+ }
+}
+
+1;
Modified: Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBICSchema.pm
===================================================================
--- Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBICSchema.pm 2009-10-17 17:15:18 UTC (rev 11601)
+++ Catalyst-Plugin-Session-Store-DBI/trunk/t/lib/TestAppDBICSchema.pm 2009-10-17 17:23:58 UTC (rev 11602)
@@ -16,28 +16,4 @@
__PACKAGE__->setup(qw/Session Session::Store::DBI Session::State::Cookie/);
-sub login : Global {
- my ( $self, $c ) = @_;
- $c->session;
- $c->res->output('logged in');
-}
-
-sub logout : Global {
- my ( $self, $c ) = @_;
- $c->res->output(
- 'logged out after ' . $c->session->{counter} . ' requests' );
- $c->delete_session('logout');
-}
-
-sub page : Global {
- my ( $self, $c ) = @_;
- if ( $c->sessionid ) {
- $c->res->output('you are logged in');
- $c->session->{counter}++;
- }
- else {
- $c->res->output('please login');
- }
-}
-
1;
More information about the Catalyst-commits
mailing list