[ANNOUNCE] Apache::Singleton 0.02 (Re: Tips tricks needed :))

2001-12-22 Thread Tatsuhiko Miyagawa
On Thu, 20 Dec 2001 11:51:30 -0500 Perrin Harkins [EMAIL PROTECTED] wrote: Like this? (using register_cleanup instead of pnotes) Better to use pnotes. I started out doing this kind of thing with register_cleanup and had problems like random segfaults. I think it was because other

RE: Tips tricks needed :)

2001-12-20 Thread Matt Sergeant
-Original Message- From: Tatsuhiko Miyagawa [mailto:[EMAIL PROTECTED]] On Wed, 19 Dec 2001 16:01:22 - Matt Sergeant [EMAIL PROTECTED] wrote: Actually I was wondering about writing an Apache::Singleton class, that works the same as Class::Singleton, but clears the

ANNOUNCE: Apache:Singleton 0.01 (Re: Tips tricks needed :))

2001-12-20 Thread Tatsuhiko Miyagawa
On Thu, 20 Dec 2001 08:57:32 - Matt Sergeant [EMAIL PROTECTED] wrote: Yeah, just like that. Why don't you wrap it up and stick it on CPAN? Saves me another module :-) Okay ;) The URL http://bulknews.net/lib/archives/Apache-Singleton-0.01.tar.gz has entered CPAN as file:

Re: Tips tricks needed :)

2001-12-20 Thread Mark Fowler
(sorry to break threading but I'm getting this from multiple lists) that IE 6 (beta at the time) considered my cookies to be third party because I used frame-based domain redirection and by default would not accept them. You need to include a P3P header in your HTTP header that contains a

Re: Tips tricks needed :)

2001-12-20 Thread Igor Sysoev
On Thu, 20 Dec 2001, Mark Fowler wrote: (sorry to break threading but I'm getting this from multiple lists) that IE 6 (beta at the time) considered my cookies to be third party because I used frame-based domain redirection and by default would not accept them. You need to include a

Re: Tips tricks needed :)

2001-12-20 Thread Perrin Harkins
Like this? (using register_cleanup instead of pnotes) Better to use pnotes. I started out doing this kind of thing with register_cleanup and had problems like random segfaults. I think it was because other cleanup handlers sometimes needed access to these resources. - Perrin

Re: Tips tricks needed :)

2001-12-20 Thread Joachim Zobel
At 10:50 19.12.01 +0200, you wrote: 4. [...] Ok, let's say we even somehow make these formulas general enough to use, but where shall the calculation take place? Postgres stored procs or in perl code/module (i think this) or even in TT? Constans will be in db. I tend to do calculations involving

Re: Tips tricks needed :)

2001-12-20 Thread Rob Nagler
By the way, is there a perl module to do calculations with money? We use Math::BigInt to do fixed point. We couldn't get the other math modules to work a few years back. Our wrapper (Bivio::Type::Number) normalizes the rounding and allows subclasses to specify precision, decimals, min, max,

Re: Tips tricks needed :)

2001-12-20 Thread Perrin Harkins
By the way, is there a perl module to do calculations with money? There's Math::Currency. - Perrin

Re: Tips tricks needed :)

2001-12-20 Thread Tatsuhiko Miyagawa
On Thu, 20 Dec 2001 11:51:30 -0500 Perrin Harkins [EMAIL PROTECTED] wrote: Like this? (using register_cleanup instead of pnotes) Better to use pnotes. I started out doing this kind of thing with register_cleanup and had problems like random segfaults. I think it was because other

Re: Tips tricks needed :)

2001-12-19 Thread Jorge Godoy
Viljo Marrandi [EMAIL PROTECTED] writes: I'm answering what I can... :-) 3. Authorization. Is cookie based auth most reasonable or are there some other ways too? .htaccess will not do, I think, because all data is in the same directory and authorized access/login is needed only on some

Re: Tips tricks needed :)

2001-12-19 Thread wsheldah
1. Regarding the switch to postgresql, I think that's a good choice. Just pay attention to postgresql's data types, and try to get your fields types and lengths correct the first time if possible. It doesn't completely support the ALTER TABLE command, so changing column types can be a pain,

Re: Tips tricks needed :)

2001-12-19 Thread fliptop
[EMAIL PROTECTED] wrote: 1. Regarding the switch to postgresql, I think that's a good choice. Just pay attention to postgresql's data types, and try to get your fields types and lengths correct the first time if possible. It doesn't completely support the ALTER TABLE command, so changing

Re: Tips tricks needed :)

2001-12-19 Thread Jean-Michel Hiver
If you're developing a complex application, you'll probably want to split it in a horde of specialized modules. Few things to remember: == You will probably feel the need to use static variables (i.e. variables shared with all instances of a given class) at some point. For example if you have a

Re: Tips tricks needed :)

2001-12-19 Thread Perrin Harkins
2. We will use Template-Toolkit and Apache/mod_perl. Problem is that 2 out of 3 people have never used TT or programmed mod_perl and OO Perl. Only I've made sites this way, they've used Embperl til now. How can I make this switch for them a little easier? Get them all copies of the Eagle

RE: Tips tricks needed :)

2001-12-19 Thread Matt Sergeant
-Original Message- From: Perrin Harkins [mailto:[EMAIL PROTECTED]] ALWAYS reinitialize $Your::Singleton::ETERNAL on each query! mod_perl will *NOT* do it for you. If you want a per-request global, use $r-pnotes() instead of a standard perl global. Then mod_perl *WILL* do it

Re: Tips tricks needed :)

2001-12-19 Thread Perrin Harkins
Actually I was wondering about writing an Apache::Singleton class, that works the same as Class::Singleton, but clears the singleton out on each request (by using pnotes). Would anyone be interested in that? This sounds a bit like Object::Registrar. If you do it, I'd suggest giving it a

Re: Tips tricks needed :)

2001-12-19 Thread Perrin Harkins
ALWAYS reinitialize $Your::Singleton::ETERNAL on each query! mod_perl will *NOT* do it for you. If you want a per-request global, use $r-pnotes() instead of a standard perl global. Then mod_perl *WILL* do it for you. You might think 'ah yeah but it would be nice if

RE: Tips tricks needed :)

2001-12-19 Thread Matt Sergeant
-Original Message- From: Perrin Harkins [mailto:[EMAIL PROTECTED]] Actually I was wondering about writing an Apache::Singleton class, that works the same as Class::Singleton, but clears the singleton out on each request (by using pnotes). Would anyone be interested in that?

Re: Tips tricks needed :)

2001-12-19 Thread Perrin Harkins
No, it's nothing like Object::Registrar. It's like Class::Singleton. Okay, wishful thinking. I don't use Class::Singleton, but I have written my own versions of Object::Registrar a few times to accomplish the same goal. I don't like to make my core classes dependent on running in a mod_perl

Re: Tips tricks needed :)

2001-12-19 Thread Rob Nagler
Perrin Harkins writes: Okay, wishful thinking. I don't use Class::Singleton, but I have written my own versions of Object::Registrar a few times to accomplish the same goal. Ditto. We use a registry mechanism, too. One thing I don't quite understand is the need to clear out a singleton.

Re: Tips tricks needed :)

2001-12-19 Thread Perrin Harkins
One thing I don't quite understand is the need to clear out a singleton. Why would a singleton need to hold transient state? It's good for holding something request-specific, like a user session.

Re: Tips tricks needed :)

2001-12-19 Thread Jean-Michel Hiver
On Wed 19-Dec-2001 at 10:43:34AM -0500, Perrin Harkins wrote: ALWAYS reinitialize $Your::Singleton::ETERNAL on each query! mod_perl will *NOT* do it for you. If you want a per-request global, use $r-pnotes() instead of a standard perl global. Then mod_perl *WILL* do it for you. True.

Re: Tips tricks needed :)

2001-12-19 Thread Perrin Harkins
If you want a per-request global, use $r-pnotes() instead of a standard perl global. Then mod_perl *WILL* do it for you. True. But then you are using the Apache object and you're program doesn't work as a standard CGI anymore :( I handle this by chekcing for $ENV{MOD_PERL} and just using

Re: Tips tricks needed :)

2001-12-19 Thread Tatsuhiko Miyagawa
On Wed, 19 Dec 2001 16:01:22 - Matt Sergeant [EMAIL PROTECTED] wrote: Actually I was wondering about writing an Apache::Singleton class, that works the same as Class::Singleton, but clears the singleton out on each request (by using pnotes). Would anyone be interested in that? Like this?