Make it work the new Plack::Request (in Plack 1.0)
[catagits/Web-Session.git] / lib / Plack / Session / State / Cookie.pm
index 2b33edb..1d6772f 100644 (file)
@@ -18,12 +18,12 @@ use Plack::Util::Accessor qw[
 
 sub get_session_id {
     my ($self, $env) = @_;
-    ( Plack::Request->new($env)->cookie( $self->session_key ) || return )->value;
+    Plack::Request->new($env)->cookies->{$self->session_key};
 }
 
 sub expire_session_id {
     my ($self, $id, $res, $options) = @_;
-    $self->_set_cookie($id, $res, expires => 0);
+    $self->_set_cookie($id, $res, expires => time);
 }
 
 sub finalize {