$c->res->output("logged in");
}
+sub login_without_address : Global {
+ my ( $self, $c ) = @_;
+ $c->session;
+ $c->log->debug($c->request->address);
+ delete $c->session->{__address};
+ $c->res->output("logged in (without address)");
+}
+
sub logout : Global {
my ( $self, $c ) = @_;
$c->res->output(
$c->delete_session("logout");
}
+sub logout_redirect : Global {
+ my ( $self, $c ) = @_;
+
+ $c->logout;
+ $c->res->output("redirect from here");
+ $c->res->redirect( $c->uri_for('from_logout_redirect') );
+}
+
+sub from_logout_redirect : Global {
+ my ( $self, $c ) = @_;
+ $c->res->output( "got here from logout_redirect" );
+}
+
sub set_session_variable : Global {
my ( $self, $c, $var, $val ) = @_;
$c->session->{$var} = $val;
$c->res->output('UA=' . $c->req->user_agent);
}
+sub accessor_test : Global {
+ my ( $self, $c ) = @_;
+
+ $c->session(
+ one => 1,
+ two => 2,
+ );
+
+ $c->session( {
+ three => 3,
+ four => 4,
+ },
+ );
+
+ $c->session->{five} = 5;
+
+ for my $key (keys %{ $c->session }) {
+ $c->res->write("$key: " . $c->session->{$key} . "\n");
+ }
+}
+
+sub dump_these_loads_session : Global {
+ my ($self, $c) = @_;
+
+ $c->dump_these();
+ if ($c->_session) {
+ $c->res->write('LOADED')
+ }
+ else {
+ $c->res->write('NOT');
+ }
+}
+
+sub change_session_expires : Global {
+ my ($self, $c) = @_;
+ $c->change_session_expires(31536000);
+ $c->res->output($c->session_expires);
+}
+
1;