[Catalyst-commits] r14250 - in
Catalyst-Plugin-Session-Store-FastMmap/trunk/t/lib: .
SessionStoreTest SessionStoreTest/Controller
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Sun Jan 22 12:26:46 GMT 2012
Author: karpet
Date: 2012-01-22 12:26:46 +0000 (Sun, 22 Jan 2012)
New Revision: 14250
Added:
Catalyst-Plugin-Session-Store-FastMmap/trunk/t/lib/SessionStoreTest/
Catalyst-Plugin-Session-Store-FastMmap/trunk/t/lib/SessionStoreTest/Controller/
Catalyst-Plugin-Session-Store-FastMmap/trunk/t/lib/SessionStoreTest/Controller/Root.pm
Modified:
Catalyst-Plugin-Session-Store-FastMmap/trunk/t/lib/SessionStoreTest.pm
Log:
refactor tests to add Root controller
Added: Catalyst-Plugin-Session-Store-FastMmap/trunk/t/lib/SessionStoreTest/Controller/Root.pm
===================================================================
--- Catalyst-Plugin-Session-Store-FastMmap/trunk/t/lib/SessionStoreTest/Controller/Root.pm (rev 0)
+++ Catalyst-Plugin-Session-Store-FastMmap/trunk/t/lib/SessionStoreTest/Controller/Root.pm 2012-01-22 12:26:46 UTC (rev 14250)
@@ -0,0 +1,21 @@
+#!/usr/bin/perl
+
+package SessionStoreTest::Controller::Root;
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+sub store_scalar : Global {
+ my ( $self, $c ) = @_;
+
+ $c->res->body( $c->session->{'scalar'} = 456 );
+}
+
+sub get_scalar : Global {
+ my ( $self, $c ) = @_;
+
+ $c->res->body( $c->session->{'scalar'} );
+}
+
+1;
+
Modified: Catalyst-Plugin-Session-Store-FastMmap/trunk/t/lib/SessionStoreTest.pm
===================================================================
--- Catalyst-Plugin-Session-Store-FastMmap/trunk/t/lib/SessionStoreTest.pm 2012-01-22 12:13:36 UTC (rev 14249)
+++ Catalyst-Plugin-Session-Store-FastMmap/trunk/t/lib/SessionStoreTest.pm 2012-01-22 12:26:46 UTC (rev 14250)
@@ -20,20 +20,8 @@
package SessionStoreTest;
use Catalyst;
- sub store_scalar : Global {
- my ( $self, $c ) = @_;
+ __PACKAGE__->setup;
- $c->res->body( $c->session->{'scalar'} = 456 );
- }
-
- sub get_scalar : Global {
- my ( $self, $c ) = @_;
-
- $c->res->body( $c->session->{'scalar'} );
- }
-
- __PACKAGE__->setup_actions;
-
}
1;
More information about the Catalyst-commits
mailing list