Doug MacEachern wrote:
> On Sat, 15 Sep 2001, Stas Bekman wrote:
> 
>>OK, here is the patch that:
>>
>>- adds the writefile sub to genfile+throw content in
>>- adds a scan for APACHE_TEST_CONFIGURE and its execution
>>
> 
> those both look good, how about if you go ahead commit both as separate
> patches?

done.


>>the ugly parts:
>>
>>- I wish PerlSwitches were working with +Parent, so I didn't have to do
>>  the ugly hack with adding yet another PerlRequire
>>
> 
> can you write up a small test case with expected/actual results?

The actual test is the smallest example I can come up with. What I want 
is to create two identical .pm files, with different contents and make 
sure that vh interpreter loads a file different from the main 
interpreter. The test passes if each one fetches its own file.

So what I want is for the main interpreter to have only the path:
t/htdocs/testdirectives/main
in @INC and the vh interpreter to have only the path:
t/htdocs/testdirectives/vh

>>- +Parent, doesn't worry to load the test INCs so every test has to do >> it
>>  manually, would be nice to do it in-core
>>
> 
> expected.  the vhost should PerlRequire modperl_startup.pl or whatever it
> needs (e.g. conf/modperl_inc.pl)

Yes, I know. I was just suggesting to have a different functionality a 
special case for test. So Apache::Test will automatically require 
modperl_startup, or whatever is required for running tests if it creates 
the <Location> with vh in it? thus removing this burden from the test 
writers.

> 
>>- +Parent doesn't clean @INC from the main interpreter, run the test:
>>  ./t/TEST -v directive/perlrequire
>>  and check the error_log -- you will see that VH includes the INC path
>>  defined in the main interpreter. I'm talking about:
>>  /home/stas/apache.org/registry/t/htdocs/testdirectives/main
>>  generated by:
>>  +PerlSwitches -Mlib=@documentroot@/testdirectives/main
>>
> 
> expected, since you did not define a PerlSwitches in your vhost.
> however, it used to be that PerlSwitches was _not_ inherited, i
> "fixed" that when you complained it was not inherited in the past.
> let's decide, should PerlSwitches be inherited if not defined in the
> vhost?

How about having this as an option? So by default PerlSwitches would be 
inherited at all:

PerlSwitchesInherit None

but then the user could write something like:

PerlSwitchesInherit All

or

PerlSwitchesInherit -Mlib /regex/?

or it doesn't make sense?

I think that if we inherit PerlSwitches by default it can bring 
surprising results, when the order of path in @INC, can break things.


_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to