Re: global variables and reparsing question (low priority ;)

2000-05-22 Thread Perrin Harkins
and another instance of set_global is compiled. Now there are two > versions of set_global, two versions of $global, and which one gets called > very much depends on random factors. > > To my pity, _some_ global (non-lexical) variables also get cleared, but > not in all packages.

Re: global variables and reparsing question (low priority ;)

2000-05-22 Thread Autarch
On Tue, 23 May 2000, Marc Lehmann wrote: > stable (mod_perl really is very unstable for large applications). Apart Wow, I wish you'd warned me before I did several large applications using mod_perl. Fortunately, they haven't experienced any mod_perl related problems. Just a fluke, I guess. An

Re: global variables and reparsing question (low priority ;)

2000-05-22 Thread Gunther Birznieks
one gets called >very much depends on random factors. > >To my pity, _some_ global (non-lexical) variables also get cleared, but >not in all packages. > >Now, since this is really hard to debug (the order of function declaration >within the same file and wether the funciton

global variables and reparsing question (low priority ;)

2000-05-22 Thread Marc Lehmann
set_global, two versions of $global, and which one gets called very much depends on random factors. To my pity, _some_ global (non-lexical) variables also get cleared, but not in all packages. Now, since this is really hard to debug (the order of function declaration within the same file and wether the

Re: Apache::ASP #include virtual loses variables

2000-05-21 Thread Joshua Chamas
Philip Mak wrote: > > So, there's no way in Apache::ASP to include a file by specifying a path > relative to DOCUMENT_ROOT, or relative to the directory of the current > file (which is not necessarily equivalent to the request URI, if the > current file is included)? > > I managed to get my site

Re: Apache::ASP #include virtual loses variables

2000-05-20 Thread Philip Mak
So, there's no way in Apache::ASP to include a file by specifying a path relative to DOCUMENT_ROOT, or relative to the directory of the current file (which is not necessarily equivalent to the request URI, if the current file is included)? I managed to get my site to work using and specifying fu

Re: Apache::ASP #include virtual loses variables

2000-05-20 Thread Joshua Chamas
Ime Smits wrote: > > | Well, I would like to suggest that you consider including in the Apache::ASP distribution, so that included files use the > | same namespace. It doesn't make sense logically that include virtual > | behaves differently from include file (other than the way the > | filename

Re: Apache::ASP #include virtual loses variables

2000-05-20 Thread Ime Smits
| Well, I would like to suggest that you consider including in the Apache::ASP distribution, so that included files use the | same namespace. It doesn't make sense logically that include virtual | behaves differently from include file (other than the way the | filename/pathname is interpreted, of

Re: Apache::ASP #include virtual loses variables

2000-05-20 Thread Ime Smits
| > I would not do it this way, in fact the way I would do this | > would not be with your methods at all, unless you want | > to have each section to be arbitrarily different and | > maintained by separate graphics designers. The way I would | > do this thing is to lose the directory structure c

Re: Apache::ASP #include virtual loses variables

2000-05-20 Thread Philip Mak
On Sat, 20 May 2000, Joshua Chamas wrote: > > > > > > For #1, know includes will be picked up from your Global directory, > so you can use that repository to share includes, instead of some > DOCUMENT_ROOT location. You can also use IncludesDir for this if > it is set. Thanks! That pretty mu

Re: Apache::ASP #include virtual loses variables

2000-05-20 Thread Joshua Chamas
Philip Mak wrote: > > I see. There are two problems that I have with file includes though: > > (1) I cannot specify a file's location relative to $ENV{'DOCUMENT_ROOT'}. > > (2) I cannot specify a file's location relative to the directory the > current file is in. > > For #1, I want to do somet

Re: Apache::ASP #include virtual loses variables

2000-05-20 Thread Philip Mak
On Sat, 20 May 2000, Joshua Chamas wrote: > Use file includes. virtual includes are meant to execute > anything and include its output, and is handles by Apache::SSI > outside of Apache::ASP. File includes will be executed as perl > asp subroutines in the same perl namespace as the > including

Re: Apache::ASP #include virtual loses variables

2000-05-20 Thread Joshua Chamas
issue with Apache::ASP > directive. Included files do not seem to be able to access the same scope > of variables. I am using the following test program: > > File 1.inc: > > > <% $test .= '1'; %> > $test = <%=$test%> > > File 2.inc: > >

Apache::ASP #include virtual loses variables

2000-05-20 Thread Philip Mak
Hello, I have stumbled upon an issue with Apache::ASP directive. Included files do not seem to be able to access the same scope of variables. I am using the following test program: File 1.inc: <% $test .= '1'; %> $test = <%=$test%> File 2.inc: <% $test = 

RE: To-Experts: BIG problem: my variables in nested subroutin

2000-05-09 Thread Kees Vonk 7249 24549
> QUESTION: But how should I transform the script, if the > anonymous subs call each other? Very simple little example: #!/usr/bin/perl -w use strict; my $i = 0; my $a; my $b = sub { print "$i\n"; exit if $i++ >= 10; &$a }; $a = sub { print "$i\n"; exit if $i++ >= 10; &$b }; &$a; Does

Re: To-Experts: BIG problem: my variables in nested subroutines, whic h call each other

2000-05-09 Thread shane
I'm seconding Ime's suggestion, and adding one piece, you don't have to use anonymous subroutines for everything..., that would be.., well, a big pain. Named subroutines where EVERYTHING it uses is passed in via references. Also it's return values are sent back via reference as well. References

Re: To-Experts: BIG problem: my variables in nested subroutines,whic h call each other

2000-05-09 Thread Ime Smits
broutines? A good programming practice is to never let a sub {} depend nor use any variables which are not explicitly passed to it. If severel subs should have some kind of globally used structures to work with, explicitly pass it by reference to each sub. If you follow that basic rule, you will w

To-Experts: BIG problem: my variables in nested subroutines, which call each other

2000-05-09 Thread Christoph Haberberger
Hi! I should migrate Perl-CGIs to mod_perl for performance reasons. We use many subroutines in our CGIs, which read and write global (my-defined) variables. Our plain subroutines are not nested, but they are when the mod_perl wrapper is put around them at execution time. In this special case

Re: sticky variables...

2000-05-01 Thread Ken Y. Clark
st a straight cgi script. It uses strict. Here's > a samepl of the code: don't use global variables. explicitly pass them. read the guide. ky

RE: sticky variables...

2000-05-01 Thread Geoffrey Young
5 PM > To: [EMAIL PROTECTED] > Subject: sticky variables... > > > first time post here :) > > I'm having a problem with some varibles changing mid-way thru > the code and > then back again. I have a program called 'cr' in the mod_perl > directory

sticky variables...

2000-05-01 Thread Andrew Dubry
first time post here :) I'm having a problem with some varibles changing mid-way thru the code and then back again. I have a program called 'cr' in the mod_perl directory. It's not a module, it's just a straight cgi script. It uses strict. Here's a samepl of the code: my ($cookie_ref,$sid,$c

RE: Embperl: my-variables in [$sub ...$][$endsub$] blocks?

2000-01-31 Thread Gerald Richter
[* *] instead? > Currently it isn't possible, but because every page is running in it's own namespace and Embperl cleans up all your variables after the request, it isn't such a problem. It's more a problem of programming style. Anyway the next

Embperl: my-variables in [$sub ...$][$endsub$] blocks?

2000-01-28 Thread Thomas Corte
Hi there, I'd like to use subroutines within my Embperl documents which use parameters. The usage proposed in the manual [$ sub foo $] [- $p = shift -] parameter: [+ $p +] [$ endsub $] works but defines $p globally, which is quite inconvenient. However, adding "my" to get [- my $

Re: problem with variables sticking.

2000-01-26 Thread Stas Bekman
l > scripts Actually we do have the idea, please read: http://perl.apache.org/guide/porting.html#Exposing_Apache_Registry_secret http://perl.apache.org/guide/porting.html#Sometimes_it_Works_Sometimes_it And remember: "mod_perl hates sloppy programmers and punishes them" :) (hi

Re: problem with variables sticking.

2000-01-26 Thread Joshua Chamas
l modules, never happened with my perl > scripts > Welcome to mod_perl! Since perl persists, your data may stay around between requests ... try putting "use strict;" at the top of your programs & modules, and work through those issues. Use 'my $var' when variable

problem with variables sticking.

2000-01-26 Thread Etienne Pelaprat
Hi, this is a huge problem. I have a module written a module with a form on it, and for some reason or another if one user fills out the form and presses the submit button (doing its stuff), and then another different user happens to access that same module to display the same form at around

RE: Logging Session IDs from environment variables

1999-10-15 Thread clinton
hanks Clint > -Original Message- > From: Young, Geoffrey S. [mailto:[EMAIL PROTECTED]] > Sent: 13 October 1999 13:15 > To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] > Subject: RE: Logging Session IDs from environment variables > > > well... > > variable

RE: Logging Session IDs from environment variables

1999-10-15 Thread Young, Geoffrey S.
-Original Message- > From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] > Sent: Friday, October 15, 1999 8:00 AM > To: 'Young, Geoffrey S.'; Clinton Gormley; [EMAIL PROTECTED] > Subject: RE: Logging Session IDs from environment variables > > Many thanks Geoff

RE: Logging Session IDs from environment variables

1999-10-13 Thread Young, Geoffrey S.
well... variables set by the notes and subprocess_env methods should be available for the entire length of the request, no matter what phase they are set. I just set up a test handler that used both notes and subprocess_env to set up variables in a PerlInitHandler and was able to capture them

Logging Session IDs from environment variables

1999-10-12 Thread clinton
Hi all I have asked this before, but I still haven't managed to shed any light on it, so I was hoping that somebody might be able to shed some more light. (While you're about it, have a look at the site we have just launched : http://www.orgasmicwines.com - mod_perl & mysql based site.) If I st

Logging Session IDs from environment variables

1999-10-11 Thread Clinton Gormley
Hi all I have asked this before, but I still haven't managed to shed any light on it, so I was hoping that somebody might be able to shed some more light. (While you're about it, have a look at the site we have just launched : http://www.orgasmicwines.com - mod_perl & mysql based site.) If I st

Re: Passing environment variables back for logging

1999-10-06 Thread Doug MacEachern
On Sun, 26 Sep 1999, Clinton Gormley wrote: > I would like to set a session ID in a module, and then record that ID in > my access log. > > I am setting the environment variable in a PerlAccess Handler by doing > this : > $r->subprocess_env('TICKET'=>$SID); > > and I try to log it using > .

<    1   2   3