[Catalyst-commits] r11752 - in
Catalyst-Plugin-Session/0.00/trunk/t: . lib
lib/SessionValid/Controller
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Wed Nov 4 22:51:58 GMT 2009
Author: t0m
Date: 2009-11-04 22:51:57 +0000 (Wed, 04 Nov 2009)
New Revision: 11752
Modified:
Catalyst-Plugin-Session/0.00/trunk/t/lib/SessionValid.pm
Catalyst-Plugin-Session/0.00/trunk/t/lib/SessionValid/Controller/Root.pm
Catalyst-Plugin-Session/0.00/trunk/t/session_valid.t
Log:
Small cleanups
Modified: Catalyst-Plugin-Session/0.00/trunk/t/lib/SessionValid/Controller/Root.pm
===================================================================
--- Catalyst-Plugin-Session/0.00/trunk/t/lib/SessionValid/Controller/Root.pm 2009-11-04 22:47:29 UTC (rev 11751)
+++ Catalyst-Plugin-Session/0.00/trunk/t/lib/SessionValid/Controller/Root.pm 2009-11-04 22:51:57 UTC (rev 11752)
@@ -1,7 +1,6 @@
package SessionValid::Controller::Root;
use strict;
use warnings;
-use Data::Dumper;
use base qw/Catalyst::Controller/;
@@ -9,9 +8,9 @@
sub index :Path :Args(0) {
my ( $self, $c ) = @_;
- $c->session->{'value'} = 'value set';
+ $c->session('value' => 'value set');
$c->session_is_valid;
- $c->res->output($c->session->{'value'});
+ $c->res->body($c->session->{value});
}
1;
Modified: Catalyst-Plugin-Session/0.00/trunk/t/lib/SessionValid.pm
===================================================================
--- Catalyst-Plugin-Session/0.00/trunk/t/lib/SessionValid.pm 2009-11-04 22:47:29 UTC (rev 11751)
+++ Catalyst-Plugin-Session/0.00/trunk/t/lib/SessionValid.pm 2009-11-04 22:51:57 UTC (rev 11752)
@@ -1,15 +1,13 @@
-#!/usr/bin/env perl
-
package SessionValid;
use Catalyst qw/Session Session::Store::Dummy Session::State::Cookie/;
use strict;
use warnings;
-__PACKAGE__->config->{'session'} = {
+__PACKAGE__->config('Plugin::Session' => {
cookie_expires => 0,
expires => 1,
-};
+});
__PACKAGE__->setup;
Modified: Catalyst-Plugin-Session/0.00/trunk/t/session_valid.t
===================================================================
--- Catalyst-Plugin-Session/0.00/trunk/t/session_valid.t 2009-11-04 22:47:29 UTC (rev 11751)
+++ Catalyst-Plugin-Session/0.00/trunk/t/session_valid.t 2009-11-04 22:51:57 UTC (rev 11752)
@@ -19,8 +19,8 @@
plan tests => 4;
}
-
-use lib "t/lib";
+use FindBin qw/$Bin/;
+use lib "$Bin/lib";
use Test::WWW::Mechanize::Catalyst "SessionValid";
my $ua = Test::WWW::Mechanize::Catalyst->new;
More information about the Catalyst-commits
mailing list