Cheers Martin. As I said, i'm new to this game. I would only ever intend to put
config-related code in the conf files, tbut i'm still trying to work out the best way
to do things.


In my case I have multiple production/development machines on different
architectures. I want to keep the configs as far as possible in sync, but some
pieces have to be different (e.g. mod_perl needs a .dll loaded on Windows that
is not required on Solaris). The docs describe exactly this use of <Perl> for
conditional configuration.


As it stands i've gone for a rather cruder approach, with the architecture-dependent
elements in the "main line" httpd.conf, and the common bits being pulled in with
Include. The logic for this decision was that the conf file would still be usable even
if the machine's perl configuration got screwed up. I have no idea if this is the right
decision at this point, but I'm sure i'll find out by experience :-}


Regards: Colin

Martin Moss wrote:

Hi Colin,

just my opinion, but from a 'practicalities' point of
view, as startup.pl gets more complex (your site grows
larger, you wish to do more intricate mod_perly
things), you will find that it is a distinct advantage
to run it from the command line in the debugger. you
wouldn't be able to do this if you buried all your
perl in the apache configs...

I'm sure there's many more reasons to keep your
startup script outside of the http configs, usually
it's because it's only neat and tidy to begin with
embedding your perl into your configs, but as your
site configs get larger, you'll probably start
thinking it a better idea to put all your <perl>
sections in their own seperate httpd conf file, which
might as well be a startup.perl script......

Marty

--- colin_e <[EMAIL PROTECTED]> wrote:

Platforms: Solaris 9, Win XP
Apache: 2.0.52
Perl: ActiveState Perl 5.8.4

Hi Guys,
New to Apache 2.0.52 and modperl, working
through the install and configure steps.


Most books and docs on using modperl recommend using
a "startup.pl" script
to configure the Perl environment on startup,
setting lib paths etc. However, Apache now
supports <Perl>...</Perl> sections directly in the
Apache config files.


In a normal perl script, a chunk of code brought in
with "require" is exactly the same as a
block inline within the the main routine.


Queastion- is this the same in Apache? I.e, instead
of using a startup.pl file can I include all the perl
configuration inline in httpd.conf inside
<Perl></Perl> blocks, with the same effect? Logically
it would seem so, but the apache docs also say
variables in the <Perl> blocks go away after use,
so it's unclear whether oeprations like "use lib
...." would have an effect.


Regards: Colin

--
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









___________________________________________________________ ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com






--
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

Reply via email to