<%args> $name $value => undef $expires => undef <%init> if (defined $value) { my $cookie = Apache::Cookie->new( $request->r(), -name => $name, -value => $value, defined $expires ? (-expires => $expires) : (), -secure => 0, ); $cookie->bake(); # $r->headers_out->add('Set-cookie' => $cookie); } else { my %cookies = Apache::Cookie->fetch; my $value = $cookies{$name}->value() if exists $cookies{$name} && $cookies{$name}; return $value; }