Skip to content

Instantly share code, notes, and snippets.

@preaction
Created June 29, 2010 17:00
Show Gist options
  • Select an option

  • Save preaction/457483 to your computer and use it in GitHub Desktop.

Select an option

Save preaction/457483 to your computer and use it in GitHub Desktop.
package MyAwesomeCookies;
my %cookies = ();
sub read_cookies {
# .. pass in $query
$cookies{name} = $query->cookie('name');
}
sub set_cookie {
my ( $name, $value ) = @_;
$cookies{$name} = $value;
}
sub write_cookies {
# ... print all the cookies from %cookies
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment