Miguel,
This is a wrong approach and will not work well. You need to add the session as middleware. The easiest way to do this is via the config file. Look up Kelp's documentation under "Adding middleware".
You can also see one of the other questions here in the mailing list for an example of how to initialize sessions.
Stefan
use Moo;extends 'Kelp::Module';
sub build { my ($self, %args) = @_; $self->register( flash_set => sub { my ($self, $key, $val) = @_; if ($val) { $self->session->{"_flash_${key}"} = $val; } },
flash_get => sub { my ($self, $key) = @_; if (my $val = $self->session->{"_flash_${key}"}) { delete $self->session->{"_flash_${key}"}; return $val; } }, );}