On Mon, 6 Aug 2001, Doug MacEachern wrote:
> On Sun, 5 Aug 2001, Stas Bekman wrote:
>
> > I understand that. I was suggesting something like
> >
> > PerlOptions +Inherit
> >
> > So you don't have to explicitly configure each vh, which can be
> > cumbersome if you have many vhs use the same modules, but a few ones which
> > are different. I'm talking about configuration flexibility and I
> > understand that if you want a separate interp it won't share the code with
> > another interp from a different pool.
>
> i suppose we could have a PerlOption for that. but at the moment it isn't
> too much trouble to have .pl files that pull in the desired modules. so
> for example:
> <VirtualHost foo>
> PerlSwitches -MFoo -MBar standard_modules.pl
> </VirtualHost>
> <VirtualHost baz>
> PerlSwitches -MBaz -MBiz standard_modules.pl
> </VirtualHost>
>
> > Is this a problem, because it's not easy to replicate a Perl interpreter
> > with everything in it? and you always have to start a fresh interpreter if
> > you want a new independent one?
>
> the interpreter needs to be built from scratch if you want a vhost to have
> different versions of a module.
I understand that. The suggested option supposedly should make it easier
to configure sites which have the same modules base: CGI, DBI, ... but can
have private modules with identical names in different hosts.
I also thought about this and I'm not sure if my idea of the Inherit
PerlOption is feasible at all. Since the configuration file once parsed
you cannot know the sequence of directives when there is more than just
the parent server. Consider:
PerlModule Foo
<VirtualHost aaa>
PerlOptions +Inherit
PerlModule Bar
</Virtual>
PerlModule FooBar
According to my idea, I'd like vh: aaa inherit everything loaded before
the declaration of <VirtualHost aaa>. This looks easy in the configuration
file. But when we do the configuration merging, there is no way to tell
whether FooBar should be inherited as well, since the main server will
have: Foo FooBar listed one after the other. Or is there such a way?
Thinking some more, your solution presented above makes things more
explicit, which is probably even cleaner, so I guess my idea should be
scratched :)
If so, can we fix Apache-Test to put all the standard_modules.pl in one
place, so we can test virtual hosts with +Parent option?
_____________________________________________________________________
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]