Hi,
> I have looked through the FAQ, the docs and what I have received
> so far on this list and I am still unclear on how to /read/
> cookies in EmbPerl. I do know how to send them. I can also read
> them with CGI.pm within EmbPerl, but surely there must be a way
> to do this directly in EmbPerl.
nope, there's no direct cookie access in Embperl. unfortunately,
'cause it shouldn't be that hard to implement something like %cdat
(similar to %fdat, %udat and %mdat).
gerald's logic (probably, I can't speak for him :) is that there
should be no need for cookies - just use the %udat hash instead.
this eliminates the need for session-cookies, but there might still
be a need for saved (with Expire date) cookies in some situations.
at the moment, you can create the %cdat hash yourself with the
following code:
[-
@ckpairs=split(/; /, $ENV{'HTTP_COOKIE'});
foreach $pair (@ckpairs)
($name, $value) = split(/=/, $pair); $cdat{$name}=$value;
}
-]
> This sounds like a caching bug.
I don't know about this one, but Embperl has had numerous caching
issues in the past. I searched my mails and found one quick patch
that should fix at least some of the caching issues in the 1.2
versions:
--- 8< --- epmain.c --- 8< ---
/* Have we seen this sourcefile already ? */
ppSV = hv_fetch(pCacheHash, (char *)sSourcefile, strlen (sSourcefile),
0) ;
if (ppSV && *ppSV)
--- 8< --- epmain.c --- 8< ---
set the if statement to something that's always false (for example,
"if (1==2)" :)
Rgds,
Tfr
--==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +1-504-4467425 >==--
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]