Re: Passing Objects with PerlSetVar
[EMAIL PROTECTED] (darren chamberlain) wrote: I just found Apache::Storage URL:http://tangent.org/Apache-Storage/, which will let you store complex data structures from httpd.conf: # httpd.conf ApacheStore o { "bar" = 1, "foo" = "com", "other" = 0 } In your handler, do: use Apache::Storage; sub handler { my $r = shift; my $o = get_storage('o'); ... And so on. I wonder why I've never heard of this module before. It looks like it's never been discussed on the list, and it's not in the module list. ------ Ken Williams Last Bastion of Euclidity [EMAIL PROTECTED]The Math Forum
Re: Passing Objects with PerlSetVar
Ken Williams ([EMAIL PROTECTED]) said something to this effect on 03/12/2001: [EMAIL PROTECTED] (darren chamberlain) wrote: I just found Apache::Storage URL:http://tangent.org/Apache-Storage/, which will let you store complex data structures from httpd.conf: I wonder why I've never heard of this module before. It looks like it's never been discussed on the list, and it's not in the module list. It's not on CPAN, as far as I know; I came across it on Freshmeat (URL:http://freshmeat.net/projects/apachestorage/). The Freshmeat main branch is dated Feb 17, so it's pretty new. It's the same guy who maintains mod_layout, if that means anything to anyone. (darren) -- A sect or party in an elegant incognito devised to save a man from the vexation of thinking. -- Ralph Waldo Emerson
RE: Passing Objects with PerlSetVar
-Original Message- From: darren chamberlain [mailto:[EMAIL PROTECTED]] Sent: Monday, March 12, 2001 12:54 PM To: [EMAIL PROTECTED] Subject: Re: Passing Objects with PerlSetVar Ken Williams ([EMAIL PROTECTED]) said something to this effect on 03/12/2001: [EMAIL PROTECTED] (darren chamberlain) wrote: I just found Apache::Storage URL:http://tangent.org/Apache-Storage/, which will let you store complex data structures from httpd.conf: I wonder why I've never heard of this module before. It looks like it's never been discussed on the list, and it's not in the module list. It's not on CPAN, as far as I know; I came across it on Freshmeat (URL:http://freshmeat.net/projects/apachestorage/). The Freshmeat main branch is dated Feb 17, so it's pretty new. http://www.cpan.org/modules/by-module/Apache/Apache-Storage-1.1.tar.gz --Geoff It's the same guy who maintains mod_layout, if that means anything to anyone. (darren) -- A sect or party in an elegant incognito devised to save a man from the vexation of thinking. -- Ralph Waldo Emerson
Passing Objects with PerlSetVar
Hello! Location Bla Perl my $o = { "bar" = 1, "foo" = "com", "other" = 0 }; push @PerlSetVar, "Objekt, $o; /Perl PerlHandler Bla /Location And inside the Bla Handler: my $o = $r-dir_config("Objekt"); Is $o now still a complex object, so i could do $o-{"bar"}, or is it just a "normal" scalar value (like HAS283752)? - Nikolaus -- Bekomme ich das mit einer wilden Kombination aus find, sed, cp und xargs hin oder sollte ich besser ein Perlskript schreiben? Verwende Perl. Shell will man koennen, dann aber nicht verwenden." - Marc Haber u. Kristian Khntopp, dcoum
RE: Passing Objects with PerlSetVar
-Original Message- From: Nikolaus Rath [mailto:[EMAIL PROTECTED]] Sent: Friday, March 09, 2001 10:00 AM To: [EMAIL PROTECTED] Subject: Passing Objects with PerlSetVar Hello! Location Bla Perl my $o = { "bar" = 1, "foo" = "com", "other" = 0 }; push @PerlSetVar, "Objekt, $o; /Perl PerlHandler Bla /Location And inside the Bla Handler: my $o = $r-dir_config("Objekt"); I don't thing that will work. dir_config() is an Apache::Table object, which stringifies everything behind the scenes. you can assign multiple values using PerlAddVar, though. PerlSetVar Foo one PerlAddVar Foo two my @list = $r-dir_config-get('Foo'); HTH --Geoff Is $o now still a complex object, so i could do $o-{"bar"}, or is it just a "normal" scalar value (like HAS283752)? - Nikolaus -- Bekomme ich das mit einer wilden Kombination aus find, sed, cp und xargs hin oder sollte ich besser ein Perlskript schreiben? Verwende Perl. Shell will man koennen, dann aber nicht verwenden." - Marc Haber u. Kristian Khntopp, dcoum
Re: Passing Objects with PerlSetVar
Nikolaus Rath ([EMAIL PROTECTED]) said something to this effect on 03/09/2001: Location Bla Perl my $o = { "bar" = 1, "foo" = "com", "other" = 0 }; push @PerlSetVar, "Objekt, $o; /Perl PerlHandler Bla /Location And inside the Bla Handler: my $o = $r-dir_config("Objekt"); Is $o now still a complex object, so i could do $o-{"bar"}, or is it just a "normal" scalar value (like HAS283752)? I just found Apache::Storage URL:http://tangent.org/Apache-Storage/, which will let you store complex data structures from httpd.conf: # httpd.conf ApacheStore o { "bar" = 1, "foo" = "com", "other" = 0 } In your handler, do: use Apache::Storage; sub handler { my $r = shift; my $o = get_storage('o'); ... And so on. (darren) -- I decided to stop worrying about my teenage daughter's driving and take advantage of it. I got one of those bumper stickers that say "How's my driving?" and put a 900 number on it. At 50 cents a call, I've been making $38 a week.
RE: Passing Objects with PerlSetVar
-Original Message- From: Nikolaus Rath [mailto:[EMAIL PROTECTED]] Sent: Friday, March 09, 2001 12:29 PM To: Geoffrey Young Subject: Re: Passing Objects with PerlSetVar I don't thing that will work. dir_config() is an Apache::Table object, which stringifies everything behind the scenes. Yes.. It doesn't work... :-| you can assign multiple values using PerlAddVar, though. PerlSetVar Foo one PerlAddVar Foo two my @list = $r-dir_config-get('Foo'); Sounds interesting. But where can i read about this feature? man mod_perl doesn't know it. PerlAddVar is documented in man Apache and in the archives PS: I'm reading the mailinglist. Isn't it better to discuss this in the public? Maybe there are other people interested in it... yes, it is best to keep discussions on the list for the benefit of all :) --Geoff bye Nikolaus