| CGI-Lazy documentation | Contained in the CGI-Lazy distribution. |
#===========================================================================
Copyright (C) 2008 by Nik Ogura. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Bug reports and comments to nik.ogura@gmail.com.
#===========================================================================
CGI::Lazy::CookieMonster
use CGI::Lazy::CookieMonster; my $cm = CGI::Lazy::CookieMonster->new; $cm->getCookie($cookieName);
Module for handling http cookies.
Come on, when was I gonna find another opportunity for a module called 'CookieMonster'?
Returns Lazy object
Constructor. Returns CookieMonster object.
CGI::Lazy object.
| CGI-Lazy documentation | Contained in the CGI-Lazy distribution. |
package CGI::Lazy::CookieMonster; use strict; use CGI::Lazy::Globals; #----------------------------------------------------------------------------------------------------------- sub getCookie { my $self = shift; my $cookie = shift; return $self->q->cookie($cookie); } #----------------------------------------------------------------------------------------------------------- sub goodEnoughForMe { my $self = shift; my $cookie = shift; return $cookie ? TRUE : FALSE; } #----------------------------------------------------------------------------------------------------------- sub q { my $self = shift; return $self->{_q}; } #----------------------------------------------------------------------------------------------------------- sub new { my $class = shift; my $q = shift; my $self = {_q => $q}; bless $self, $class; } 1 __END__