diff options
Diffstat (limited to 'debian/perl-framework/Apache-Test/t/cgi-bin/cookies.pl.PL')
-rw-r--r-- | debian/perl-framework/Apache-Test/t/cgi-bin/cookies.pl.PL | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/debian/perl-framework/Apache-Test/t/cgi-bin/cookies.pl.PL b/debian/perl-framework/Apache-Test/t/cgi-bin/cookies.pl.PL new file mode 100644 index 0000000..b409448 --- /dev/null +++ b/debian/perl-framework/Apache-Test/t/cgi-bin/cookies.pl.PL @@ -0,0 +1,16 @@ +#!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"; |