Apache::Wyrd::Cookie - Consistency wrapper for Apache::Cookie and CGI::Cookie
use Apache::Wyrd::Cookie; #$req is Apache request object my $cookie = Apache::Wyrd::Cookie->new( $req, -name=>'check_cookie', -value=>'checking', -domain=>$req->hostname, -path=>($auth_path || '/') ); $cookie->bake; my %cookie = Apache::Wyrd::Cookie->fetch; my $g_value = $cookie{'gingerbread'};
Wrapper for Apache::Cookie or CGI:Cookie cookies. This class is provided for no other reason than to make the new and bake methods consistent in their requirements between these modules, which they are not normally. Otherwise, Apache::Wyrd::Cookie behaves entirely like Apache::Cookie or CGI::Cookie depending on which is installed and takes the same arguments to its methods. Please refer to the documentation for those modules.
Apache::Cookie
CGI:Cookie
new
bake
Apache::Wyrd::Cookie
CGI::Cookie
The normal behavior is to favor Apache::Cookie. If it is not installed, it will attempt to use CGI. Failing both, it will call die(), causing a server error. You can force the use of Apache::Cookie or CGI::Cookie by setting the WYRD_USE_CGI or WYRD_USE_APR environment variables. If the forced module fails to load, the module will die(), causing a server error. Note that using these environement variables also affects the behavior of Apache::Wyrd::Cookie.
die()
UNKNOWN
Barry King <wyrd@nospam.wyrdwright.com>
General-purpose HTML-embeddable perl object
Cookies under Apache
Copyright 2002-2007 Wyrdwright, Inc. and licensed under the GNU GPL.
See LICENSE under the documentation for Apache::Wyrd.
Apache::Wyrd
To install Apache::Wyrd, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache::Wyrd
CPAN shell
perl -MCPAN -e shell install Apache::Wyrd
For more information on module installation, please visit the detailed CPAN module installation guide.