sub SetCookies {
my (%input) = @_;
while( my($name,$value) = each %input )
{
my $c = CGI->cookie (
-name => $name,
-value => $value,
-expires => ((exists($cookie_config{expires}) && $cookie_config{expires} ==1) ? $cookie_config{expires} : undef),
-domain => ((exists($cookie_config{domain}) && $cookie_config{domain} ==1) ? $cookie_config{domain} : undef),
-secure => ((exists($cookie_config{secure}) && $cookie_config{secure} ==1) ? $cookie_config{secure} : undef),
-path => ((exists($cookie_config{path}) && $cookie_config{path} ==1) ? $cookie_config{path} : undef),
);
print "Set-Cookie: ", $c, "\n";
}
}
####
$c = new CGI::Cookie(-name => 'foo',
-value => 'bar',
-expires => '+3M',
-domain => '.capricorn.com',
-path => '/cgi-bin/database',
-secure => 1
);
####
# $Log: cookielib,v $
# Revision 1.6 2006/04/08 08:34:31 gellyfish
# Appeared to be a cut and paste error in SetCookies