Apache-Test

 view release on metacpan or  search on metacpan

t/cgi-bin/cookies.pl.PL  view on Meta::CPAN

#!perl -wT

use strict;

use CGI;
use CGI::Cookie;

my %cookies = CGI::Cookie->fetch;
my $name = 'ApacheTest';
my $c = ! exists $cookies{$name}
    ? CGI::Cookie->new(-name=>$name, -value=>time)
    : '';

print "Set-Cookie: $c\n" if $c;
print "Content-Type: text/plain\n\n";
print ($c ? 'new' : 'exists'), "\n";



( run in 0.521 second using v1.01-cache-2.11-cpan-39bf76dae61 )