Apache::Singleton

2003-12-16 Thread Chris Ochs
Hmmm after playing around with Apache::Singleton I am having a hard time understanding exactly how you use it. I failed to find even one complete example of it's use, just bits and pieces, and I'm afraid I don't understand how it all fits together. I read the Class::Single

Apache::Singleton

2004-10-18 Thread Frank Wiles
Hi Everyone, I've been trying to reach the maintainer of Apache::Singleton with very little success. His name is Tatsuhiko Miyagawa <[EMAIL PROTECTED]> I supplied him with a patch that makes the module work under both mp1 and mp2 back in April and haven't been abl

Re: Apache::Singleton

2003-12-16 Thread Chris Ochs
Here is the code that I cant' get working, maybe it is easier to just correct what I have so far... package Test::One; use strict; use Apache::Constants qw(:common); use Apache::Singleton::Request; use base qw(Apache::Singleton::Request); use vars qw($r); my $var1 = "test"; sub

Re: Apache::Singleton

2003-12-17 Thread Perrin Harkins
Chris Ochs wrote: Here is the code that I cant' get working, maybe it is easier to just correct what I have so far... I'm afraid I can't tell what you're trying to do here. One big problem with this code is that you're putting the request object ($r, by convention) into a global. Don't do that

Re: Apache::Singleton

2003-12-17 Thread Chris Ochs
I'm just trying to see how Apache::Singleton works. If my code is not understandable, that's how far off I probably am from knowing how it works.. That was why I asked if someone had a complete sample. Actually I don't think I will use Singleton, it just seems like a lot more

Re: Apache::Singleton

2003-12-17 Thread Perrin Harkins
Chris Ochs wrote: Actually I don't think I will use Singleton, it just seems like a lot more work then it's worth for me. It's more useful for handling access to an object, like a Template Toolkit instance for example. I have a hash for the posted cgi variables but that gets cleared out when it's

Fw: Apache::Singleton

2003-12-17 Thread Chris Ochs
> > > > > I have a hash for the posted cgi variables but > > > that gets cleared out when it's reset anyways, and I have about 30 > global > > > variables that I just set explicitly at the start of the code. > > > > That sounds fine. Eventually you should probably look at turning those > > into

Re: Apache::Singleton

2003-12-17 Thread Stas Bekman
Chris Ochs wrote: I'm just trying to see how Apache::Singleton works. If my code is not understandable, that's how far off I probably am from knowing how it works.. That was why I asked if someone had a complete sample. BTW, if you have the "Practical mod_perl" book, pages

Re: Apache::Singleton

2003-12-17 Thread Chris Ochs
- Original Message - From: "Stas Bekman" <[EMAIL PROTECTED]> To: "Chris Ochs" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, December 17, 2003 10:11 AM Subject: Re: Apache::Singleton > Chris Ochs wrote: > > I'm just tr

Re: Apache::Singleton

2003-12-17 Thread Tatsuhiko Miyagawa
On Wed, 17 Dec 2003 09:32:41 -0800 "Chris Ochs" <[EMAIL PROTECTED]> wrote: > I'm just trying to see how Apache::Singleton works. If my code is not > understandable, that's how far off I probably am from knowing how it works.. > That was why I asked if someon

Re: Apache::Singleton

2004-10-18 Thread Stas Bekman
Frank Wiles wrote: Hi Everyone, I've been trying to reach the maintainer of Apache::Singleton with very little success. His name is Tatsuhiko Miyagawa <[EMAIL PROTECTED]> I supplied him with a patch that makes the module work under both mp1 and mp2 back in April and h

Re: Apache::Singleton

2004-10-19 Thread Kevin Spencer
On Mon, 18 Oct 2004 12:34:28 -0500, Frank Wiles <[EMAIL PROTECTED]> wrote: > > Hi Everyone, > > I've been trying to reach the maintainer of Apache::Singleton with > very little success. His name is Tatsuhiko Miyagawa > <[EMAIL PROTECTED]> I suppl

Re: Apache::Singleton

2004-10-19 Thread Frank Wiles
On Tue, 19 Oct 2004 10:02:06 -0700 Kevin Spencer <[EMAIL PROTECTED]> wrote: > On Mon, 18 Oct 2004 12:34:28 -0500, Frank Wiles <[EMAIL PROTECTED]> > wrote: > > > > Hi Everyone, > > > > I've been trying to reach the maintainer of Apache::Singlet

Apache::Singleton (sharing one object)

2005-08-12 Thread Tesfaiesus, Mesel
Object as the properties are set to default every time. My Testcode is printing out a $counter - which it saved as an attribute of the object - that's supposed to increment with every request: ### MyClass Module ### package MyClass; use base qw (Ap

Re: Apache::Singleton (sharing one object)

2005-08-12 Thread Praveen Ray
Shouldn't you be using the database itself to store the state? Will Apache::Singleton instance replicate itself if you were to run your application on multiple servers behind load balancers (for scalability and fail-over purposes)? If yes, you probably should usw Storage Module to save you

Re: Apache::Singleton (sharing one object)

2005-08-12 Thread Perrin Harkins
n. To make it switch to process scope, use this: use base qw (Apache::Singleton::Process); However, this will only persist in the one process (it's like putting the object in a global). If what you need is to make it available in all processes, create it during startup and put it in a global

RE: Apache::Singleton (sharing one object)

2005-08-12 Thread Tesfaiesus, Mesel
That's it! Thx a lot. Cheers, Mesel -Original Message- From: Perrin Harkins [mailto:[EMAIL PROTECTED] Sent: Friday, August 12, 2005 16:25 To: Tesfaiesus, Mesel Cc: modperl@perl.apache.org Subject: Re: Apache::Singleton (sharing one object) On Fri, 2005-08-12 at 15:40