I want to be able to detect if I can write cookies out or not.
Currently I'm doing:
my $cgi = new CGI;
my $cookie = $cgi->cookie(-name => $POLL_CODE_TEST,
-value => "cookietest",
-expires => "1d",
-path => '/',
-domain => $COOKIE_REALM);
print $cgi->cookie($POLL_CODE_TEST);
Now this doesn't work. Even when you can write out cookies,
$cgi->cookie($POLL_CODE_TEST) doesn't give me it back. Now I'm
guessing that the CGI object doesn't acturally write out the cookies
until it's destructor... So I tried it in a different scope but that
didn't work. Maybe I don't understand perl scope, which is very
possible.
What am I missing, and is there a better way to test you can write out
cookies?
Thankyou for anyhelp.