Revision 469 (by ahitrov, 2014/12/24 13:57:26) Moving Contenido to Apache 2

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