sukria/dancer2 — Issue #15: session_dir doesn't work
Author: geistteufel
Created: 2011-11-14 22:37:21+00:00
State: open

I have try to use Dancer-Plugin-Auth-RBAC and I face to an issue,
session_dir seems doesn't work.

I have made 3 tests :

first config :

config.yml:

```YAML
session: YAML
session_dir: /tmp/test
```

=> test is not created, and session still store in $APPDIR/sessions

then another conf :

```YAML
session: YAML
engines:
session:
session_dir: /tmp/test
```

=> still doesn't work, same as before

I try it manually :

```perl

#!/usr/bin/env perl

# PODNAME: app
# ABSTRACT: Dancer starter app

BEGIN {
push @INC, glob("vendors/*/lib");
}

use strict;
use warnings;
use 5.014;
use Carp;

# VERSION

use Dancer 1.9999;
use Dancer::Session::YAML;

session->session_dir('/tmp/cgTokenApi');

get '/' => sub {
to_yaml(session());
};

get '/write/:a/:b' => sub {
session params->{a} => params->{b};
};

start;
```

=> I have the same issue than the RBAC plugin :

```log
Can't call method "cookie" on an undefined value at vendors/Dancer2/lib/Dancer/Core/App.pm line 75, line 16.
```

and 'session_dir' directly doesn't work, it's not a keyword.

did I miss something ?