On Mon, 2004-10-04 at 08:15, David Radunz wrote: > My patch: This looks like a good idea to me. I'd say we should put it in.
> For example: > > print STDERR 'time_constant = '. &time_constant(). "\n"; > sub time_constant () { > time. ' '. $$; > } > > running under 'httpd -X' > > would produce a different time each request, and the same process id. That's okay, since it would give a different time under CGI as well. My advice in general is that you just shouldn't use constants in Perl. The subroutine thing is kind of a hack, and the confusing problems with stringification are not worth the performance boost. Just use package variables instead. This doesn't work so well for running other people's code though. - Perrin -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html