Permalink
Browse files

Limit scope of $cookie.

  • Loading branch information...
1 parent c235bac commit bb4be4e58801c90e62845289177803603b538a76 @AndyA AndyA committed Dec 27, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 t/020.cookie.t
View
@@ -403,10 +403,13 @@ my @test_cookie = (
MAX_AGE: {
+ {
my $cookie = CGI::Simple::Cookie->new( -name=>'a', value=>'b', '-expires' => 'now',);
is $cookie->expires, 'Thu, 01-Jan-1970 00:01:40 GMT';
is $cookie->max_age => undef, 'max-age is undefined when setting expires';
+ }
+ {
my $cookie = CGI::Simple::Cookie->new( -name=>'a', 'value'=>'b' );
$cookie->max_age( '+4d' );
@@ -415,5 +418,6 @@ MAX_AGE: {
$cookie->max_age( '113' );
is $cookie->max_age => 13, 'max_age(num) as delta';
+ }
}

0 comments on commit bb4be4e

Please sign in to comment.