Name

read-cookie — reads browser cookie

ATTRIBUTES

Attribute Pos. Req. Default Description
name Yes name of the cookie
interpolate     0 interpolate output?
hide     0 Hide the tag return value?

DESCRIPTION

[read-cookie] returns value of the named cookie.

BEHAVIOR

This tag does not appear to be affected by, or affect, the rest of Interchange.

EXAMPLES

No examples are available at this time. We do consider this a problem and will try to supply some.

NOTES

AVAILABILITY

read-cookie is available in Interchange versions:

4.6.0-5.7.0 (git-head)

SOURCE

Interchange 5.7.0:

Source: code/SystemTag/read_cookie.coretag
Lines: 12


# Copyright 2002-2007 Interchange Development Group and others
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.  See the LICENSE file for details.
# 
# $Id: read_cookie.coretag,v 1.5 2007-03-30 23:40:49 pajamian Exp $

UserTag read-cookie         Order        name
UserTag read-cookie         Version      $Revision: 1.5 $
UserTag read-cookie         MapRoutine   Vend::Util::read_cookie

Source: lib/Vend/Util.pm
Lines: 2095

sub read_cookie {
my ($lookfor, $string) = @_;
$string = $CGI::cookie
  unless defined $string;
  return cookies_hash($string) unless defined $lookfor && length($lookfor);
  return undef unless $string =~ /(?:^|;)\s*\Q$lookfor\E=([^\s;]+)/i;
 return unescape_chars($1);
}

AUTHORS

Interchange Development Group

SEE ALSO

set-cookie(7ic)

DocBook! Interchange!