Re: [Templates] TT2, Apache2, mod_perl2, Apache::SessionManager

[prev] [thread] [next] [Date index for 2004/06/13]

From: Enrico Sorcinelli
Subject: Re: [Templates] TT2, Apache2, mod_perl2, Apache::SessionManager
Date: 06:22 on 13 Jun 2004
This is a multi-part message in MIME format.

--Multipart=_Sun__13_Jun_2004_08_22_25_+0200_ES3qHEJyNnQ5cT4t
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Sat, 12 Jun 2004 21:58:07 -0400
Geoffrey Young <geoff@xxxxxxxxxxxxxxx.xxx> wrote:

Hi Geoff,

> > I might need Apache::Cookie in other code in this server, so I'll see if
> > I can patch Apache::SessionManager to not *use* Apache::Cookie via a
> > PerlSetEnv.
 
Mike: thanks for the suggested patch
However, requiring CGI::Cookie even if we don't use it, sounds not too good for
me :-).

> yeah, that's what I was going to suggest - give the user the option of
> choosing whether to use Apache::Cookie or CGI::Cookie.

This is a possibility, but I think that the module should do all possible work
beside the scenes, including choice of appropriate cookie management library.
Since choice of cookie library is in a BEGIN block, we don't control easily via
PerlSetVar mechanism (aslo we should put a "PerlSerVar useCGI On|Off" directive
before "PerlModule A::SM" that is not too clean for me).
Also, why use CGI::Cookie instead of fast and light Apache::Cookie if it's
intalled (in a MP environment of course)? :-)

I think that by patching A::SM 1.01 (I included the patch) with a line like:

my %cookies = $Apache::Request::VERSION >= 2  
	? Apache::Cookie->fetch($r) : Apache::Cookie->fetch;

will solve the problem.
I'll upload a new version to CPAN asap (including other features).

> oh, and enrico, you can reduce the amount of mp2 logic by not compiling
> constants into the Apache class - if you don't use the -compile option with
> Apache::Const then you get them in the current package, so OK (and not
> Apache::OK) would be the call, allowing both mp1 and mp2 to look the same.
> it adds another symbol table entry, but keeps the code cleaner so I guess
> you can decide which is more important :)

Interesting. I have not investigated this when I ported the module to mp2. 
Simply I have read perl.apache.org porting guidelines docs.
But maybe we are a little bit off topic in this list... It could be interesting
to switch in mp list.

by

	- Enrico



--Multipart=_Sun__13_Jun_2004_08_22_25_+0200_ES3qHEJyNnQ5cT4t
Content-Type: application/octet-stream;
 name="A-SM-1.01.patch"
Content-Disposition: attachment;
 filename="A-SM-1.01.patch"
Content-Transfer-Encoding: base64

LS0tIFNlc3Npb25NYW5hZ2VyLnBtCTIwMDQtMDEtMjMgMTc6MjA6MTUuMDAwMDAwMDAwICswMTAw
CisrKyBTZXNzaW9uTWFuYWdlci5wbS1wYXRjaGVkCTIwMDQtMDYtMTMgMDY6NDQ6NTkuMDAwMDAw
MDAwICswMjAwCkBAIC0xMTgsNyArMTE4LDggQEAKIAl1bmxlc3MgKCAkc2Vzc2lvbl9jb25maWd7
J1Nlc3Npb25NYW5hZ2VyVVJJVHJhY2tpbmcnfSBlcSAnT24nICkgewogCiAJCWlmICggJGxpYmFw
cmVxICkgewotCQkJbXkgJWNvb2tpZXMgPSBBcGFjaGU6OkNvb2tpZS0+ZmV0Y2g7IAorCQkJIyBU
ZXN0IGxpYmFwcmVxIDEgb3IgMiB2ZXJzaW9uIHRvIHVzZSBjb3JyZWN0ICdmZXRjaCcgQVBJCisJ
CQlteSAlY29va2llcyA9ICRBcGFjaGU6OlJlcXVlc3Q6OlZFUlNJT04gPj0gMiA/IEFwYWNoZTo6
Q29va2llLT5mZXRjaCgkcikgOiBBcGFjaGU6OkNvb2tpZS0+ZmV0Y2g7CiAJCQkkc2Vzc2lvbl9p
ZCA9ICRjb29raWVzeyRzZXNzaW9uX2NvbmZpZ3snU2Vzc2lvbk1hbmFnZXJOYW1lJ319LT52YWx1
ZSBpZiBkZWZpbmVkICRjb29raWVzeyRzZXNzaW9uX2NvbmZpZ3snU2Vzc2lvbk1hbmFnZXJOYW1l
J319OwogCQkJcHJpbnQgU1RERVJSICIkZGVidWdfcHJlZml4IEFwYWNoZTo6Q29va2llIGZldGNo
XG4iIGlmICRzZXNzaW9uX2NvbmZpZ3snU2Vzc2lvbk1hbmFnZXJEZWJ1Zyd9ID49IDU7CiAgICAg
ICB9Cg==

--Multipart=_Sun__13_Jun_2004_08_22_25_+0200_ES3qHEJyNnQ5cT4t--

_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

(message missing)

Re: [Templates] TT2, Apache2, mod_perl2, Apache::SessionManager
Enrico Sorcinelli 06:22 on 13 Jun 2004

[Templates] Templates and mod_rewrite.
=?ISO-8859-1?Q?Lo=EFc?= Paillotin 09:22 on 22 Jun 2004

Re: [Templates] Templates and mod_rewrite.
=?ISO-8859-1?Q?Lo=EFc?= Paillotin 09:43 on 22 Jun 2004

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52