PerlAddVar alternative in v1.21

2002-01-25 Thread Vladislav Shchogolev
Hello, I'm using mod_perl 1.21 on a host where i don't have the option of upgrading mod_perl. Is there an alternative way to use PerlSetVar to simulate the effect of PerlAddVar. I want to create a variable, namely MasonCompRoot, that has two entries in it. Thanks, Vlad

Re: PerlAddVar alternative in v1.21

2002-01-25 Thread Geoffrey Young
Vladislav Shchogolev wrote: Hello, I'm using mod_perl 1.21 on a host where i don't have the option of upgrading mod_perl. Is there an alternative way to use PerlSetVar to simulate the effect of PerlAddVar. I want to create a variable, namely MasonCompRoot, that has two entries in it. I

Re: PerlAddVar alternative in v1.21

2002-01-25 Thread Dave Rolsky
On Fri, 25 Jan 2002, Geoffrey Young wrote: I think I just read in the eagle book the other day that suggested something like PerlSetVar MasonCompRoot foo:bar my @roots = split :, $r-dir_config('MasonCompRoot'); or whatever... Except that the code that read the dir_config is part of the

RE: PerlAddVar bug

2000-09-26 Thread Doug MacEachern
On Thu, 6 Jul 2000, Geoffrey Young wrote: I guess my expectation is that $r-dir_config('MyVar') and $r-dir_config-get('MyVar') should inherit equally, which as far as I can tell, they don't. PerlSetVar or PerlAddVar - it makes no difference. the problem is related to the Apache::Server

RE: PerlAddVar bug

2000-09-26 Thread Geoffrey Young
-Original Message- From: Doug MacEachern [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 26, 2000 2:35 PM To: Geoffrey Young Cc: 'Eric Cholet'; Matt Sergeant; [EMAIL PROTECTED] Subject: RE: PerlAddVar bug On Thu, 6 Jul 2000, Geoffrey Young wrote: I guess my

RE: PerlAddVar bug

2000-09-26 Thread Doug MacEachern
On Tue, 26 Sep 2000, Geoffrey Young wrote: groovy - the patch seems to work just fine (you've been busy, it seems :) cool! p.s. i also just committed a change so PerlAddVar is now an ITERATE2 rather than TAKE 2, so you can say: PerlAddVar Key val-one val-two val-three

PerlAddVar bug

2000-07-06 Thread Geoffrey Young
Sorry to bring up PerlAddVar again, but this time I have a legitimate bug. It stems from what I reported last time about items in Apache::Table not being visible outside a Location directives: that is, given: Alias /test /usr/local/apache/test # this outside value of foo doesn't get seen

Re: PerlAddVar bug

2000-07-06 Thread Matt Sergeant
On Thu, 6 Jul 2000, Geoffrey Young wrote: Sorry to bring up PerlAddVar again, but this time I have a legitimate bug. It stems from what I reported last time about items in Apache::Table not being visible outside a Location directives: See the section on DIR_MERGE in the Eagle book. It just

Re: PerlAddVar bug

2000-07-06 Thread Eric Cholet
On Thu, 6 Jul 2000, Geoffrey Young wrote: Sorry to bring up PerlAddVar again, but this time I have a legitimate bug. It stems from what I reported last time about items in Apache::Table not being visible outside a Location directives: See the section on DIR_MERGE in the Eagle book

RE: PerlAddVar bug

2000-07-06 Thread Geoffrey Young
-Original Message- From: Eric Cholet [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 06, 2000 1:47 PM To: Matt Sergeant; Geoffrey Young Cc: [EMAIL PROTECTED] Subject: Re: PerlAddVar bug On Thu, 6 Jul 2000, Geoffrey Young wrote: Sorry to bring up PerlAddVar again

is PerlAddVar working?

2000-06-23 Thread Geoffrey Young
hi all... I've been trying all morning to access PerlAddVar variables as expected (see http://marc.theaimsgroup.com/?l=apache-modperlm=95718409824646w=2 and forward) I'm not sure if anyone tested Doug's patch (http://marc.theaimsgroup.com/?l=apache-modperlm=95742001627308w=2

Re: PerlAddVar ?

2000-05-08 Thread Drew Taylor
Stas Bekman wrote: Cool! I guess it's a non-documented feature :) it's documented in ch9 of the eagle book :) If it is, consider it documented in the next version of the Guide :) I'm looking at page 456 right now, and from my newbie perspective, I conclude it's mostly documented. :-)

Re: PerlAddVar ?

2000-05-05 Thread Stas Bekman
On Wed, 3 May 2000, Doug MacEachern wrote: On Mon, 1 May 2000, Stas Bekman wrote: That [the name] would be confusing. How about: not if you think of it in terms of an apache table: PerlSetVar = ap_table_set PerlAddVar = ap_table_add OK, if this is the case, I'd prefer to have only

Re: PerlAddVar ?

2000-05-05 Thread Matt Sergeant
On Fri, 5 May 2000, Stas Bekman wrote: On Wed, 3 May 2000, Doug MacEachern wrote: On Mon, 1 May 2000, Stas Bekman wrote: That [the name] would be confusing. How about: not if you think of it in terms of an apache table: PerlSetVar = ap_table_set PerlAddVar = ap_table_add

Re: PerlAddVar ?

2000-05-05 Thread Doug MacEachern
On Thu, 4 May 2000, Matt Sergeant wrote: How do you get at $r in a directive handler? other way around, you get at directive handler config from a handler, which has been passed $r, e.g.: sub handler { my $r = shift; my $cfg = Apache::ModuleConfig-get($r, __PACKAGE__); $cfg would

Re: PerlAddVar ?

2000-05-05 Thread Matt Sergeant
On Fri, 5 May 2000, Doug MacEachern wrote: On Thu, 4 May 2000, Matt Sergeant wrote: How do you get at $r in a directive handler? other way around, you get at directive handler config from a handler, which has been passed $r, e.g.: sub handler { my $r = shift; my $cfg =

Re: PerlAddVar ?

2000-05-05 Thread Stas Bekman
it to be a hash -- you can have it as well. This makes thing simple and even eliminates the need for PerlSetVar, you can have only PerlAddVar for everything. my @values = $r-dir_config-get('Key'); and my %hash = $r-dir_config-get('Key'); already does that, regardless of using PerlSetVar

Re: PerlAddVar ?

2000-05-05 Thread Doug MacEachern
Cool! I guess it's a non-documented feature :) it's documented in ch9 of the eagle book :)

Re: PerlAddVar ?

2000-05-05 Thread Stas Bekman
Cool! I guess it's a non-documented feature :) it's documented in ch9 of the eagle book :) If it is, consider it documented in the next version of the Guide :) __ Stas Bekman | JAm_pH--Just Another

Re: PerlAddVar ?

2000-05-05 Thread brian moseley
On Fri, 5 May 2000, Doug MacEachern wrote: Cool! I guess it's a non-documented feature :) it's documented in ch9 of the eagle book :) :)

Re: PerlAddVar ?

2000-05-03 Thread Doug MacEachern
On Mon, 1 May 2000, Matt Sergeant wrote: It would be nice, in my opinion, to have some way of doing: PerlAddVar Fred "Value 1" PerlAddVar Fred "Value 2" And then in your script: my @values = $r-dir_config('Fred'); which gets ("Value 1","Va

Re: PerlAddVar ?

2000-05-03 Thread Doug MacEachern
On Mon, 1 May 2000, Stas Bekman wrote: That [the name] would be confusing. How about: not if you think of it in terms of an apache table: PerlSetVar = ap_table_set PerlAddVar = ap_table_add

PerlAddVar ?

2000-05-01 Thread Matt Sergeant
It would be nice, in my opinion, to have some way of doing: PerlAddVar Fred "Value 1" PerlAddVar Fred "Value 2" And then in your script: my @values = $r-dir_config('Fred'); which gets ("Value 1","Value 2") in @values. Any thoughts on this? (I'm n

Re: PerlAddVar ?

2000-05-01 Thread Stas Bekman
It would be nice, in my opinion, to have some way of doing: PerlAddVar Fred "Value 1" PerlAddVar Fred "Value 2" And then in your script: my @values = $r-dir_config('Fred'); which gets ("Value 1","Value 2") in @values. Any thoughts on t

Re: PerlAddVar ?

2000-05-01 Thread Matt Sergeant
On Mon, 1 May 2000, Stas Bekman wrote: It would be nice, in my opinion, to have some way of doing: PerlAddVar Fred "Value 1" PerlAddVar Fred "Value 2" And then in your script: my @values = $r-dir_config('Fred'); which gets ("Value 1",&

Re: PerlAddVar ?

2000-05-01 Thread Richard Dice
It would be nice, in my opinion, to have some way of doing: PerlAddVar Fred "Value 1" PerlAddVar Fred "Value 2" And then in your script: my @values = $r-dir_config('Fred'); which gets ("Value 1","Value 2") in @values. Any th

Re: PerlAddVar ?

2000-05-01 Thread Stas Bekman
It would be nice, in my opinion, to have some way of doing: PerlAddVar Fred "Value 1" PerlAddVar Fred "Value 2" And then in your script: my @values = $r-dir_config('Fred'); which gets ("Value 1","Value 2") in @values.

Re: PerlAddVar ?

2000-05-01 Thread Richard Dice
Perl blocks get evaluated in the Apache::ReadConfig namespace, which knows nothing about location it's placed in. What you can do is to set FQDN variables from within Perl section: Right... I didn't actually expect the perl block suggestion to be something that would work. I didn't know

Re: PerlAddVar ?

2000-05-01 Thread Matt Sergeant
On Mon, 1 May 2000, Stas Bekman wrote: Would it not be possible / preferable to handle this kind of thing from within Perl blocks? (localized to location, directory etc. blocks, even) At least, something along these lines would cut down on the amount of configuration syntax that would

Re: PerlAddVar ?

2000-05-01 Thread Matt Sergeant
On Mon, 1 May 2000, Richard Dice wrote: Perl blocks get evaluated in the Apache::ReadConfig namespace, which knows nothing about location it's placed in. What you can do is to set FQDN variables from within Perl section: Right... I didn't actually expect the perl block suggestion to be