Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add utility function cookies_hash to return all current cookies as a …

…hashref
  • Loading branch information...
commit 78543c56c97c3119cd3761c5e4e80bad4150111b 1 parent e28246e
@machack666 machack666 authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/Vend/Util.pm
View
9 lib/Vend/Util.pm
@@ -2010,6 +2010,15 @@ sub read_cookie {
return unescape_chars($1);
}
+sub cookies_hash {
+ my $string = shift || $CGI::cookie;
+ my %cookies = map {
+ my ($k,$v) = split '=', $_, 2;
+ $k => unescape_chars($v)
+ } split(/;\s*/, $string);
+ return \%cookies;
+}
+
sub send_mail {
my($to, $subject, $body, $reply, $use_mime, @extra_headers) = @_;
Please sign in to comment.
Something went wrong with that request. Please try again.