X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Session-State-Cookie.git;a=blobdiff_plain;f=lib%2FCatalyst%2FPlugin%2FSession%2FState%2FCookie.pm;h=8d32081e6de65e71774852d26f848db42ab27ee9;hp=9f31965203180b8e8d3a77c17f1804a1319d9488;hb=bab1512d7270f7f38f63a54ebe0677f27e9172b5;hpb=ab649d6b05c0b11e96f08f420d83d02db39766ce diff --git a/lib/Catalyst/Plugin/Session/State/Cookie.pm b/lib/Catalyst/Plugin/Session/State/Cookie.pm index 9f31965..8d32081 100644 --- a/lib/Catalyst/Plugin/Session/State/Cookie.pm +++ b/lib/Catalyst/Plugin/Session/State/Cookie.pm @@ -1,15 +1,15 @@ package Catalyst::Plugin::Session::State::Cookie; -use base qw/Catalyst::Plugin::Session::State Class::Accessor::Fast/; +use Moose; +use namespace::autoclean; -use strict; -use warnings; +extends 'Catalyst::Plugin::Session::State'; use MRO::Compat; use Catalyst::Utils (); -our $VERSION = "0.12"; +our $VERSION = "0.14"; -BEGIN { __PACKAGE__->mk_accessors(qw/_deleted_session_id/) } +has _deleted_session_id => ( is => 'rw' ); sub setup_session { my $c = shift; @@ -77,8 +77,8 @@ sub make_session_cookie { $cookie->{secure} = 1 unless ( ($sec==0) || ($sec==2) ); $cookie->{secure} = 1 if ( ($sec==2) && $c->req->secure ); - my $hto = $cookie->{httponly} || 1; # default = 1 (set httponly) - $cookie->{httponly} = 1 unless ($hto==0); + $cookie->{httponly} = 1 + unless exists $cookie->{httponly}; # default = 1 (set httponly) return $cookie; } @@ -305,6 +305,10 @@ has been heavily modified since. =head1 COPYRIGHT +Copyright (c) 2005, Yuval Kogman C<< >> + +=head1 LICENSE + This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.