Jean-Michel Hiver wrote:

[snip]

>
>A list of things I've noticed:
>
>* If you have two *different* modules which have the same name, then
>either one, or the other is loaded in memory, never both. This is
>dead annoying. I think Perl standard modules + CPAN modules should be
>shared, other modules which are specific to a given script should not.
>
And who's to say that a custom module that you write can't end up on 
CPAN???  Or even as a "Standard" module?  There may be ways of fiddling 
with @INC to do what you want, but it would be much easier if you, the 
developer, took care to make unique namespaces for your different 
projects...

>
>* Global variables should be reinitialized on each request. Or at least
>if we want them to be persistent we do not want them to be shared with
>different scripts on different virtual hosts!
>
If you want them reset each time, then reset them to undef manually. 
 The alternative is having Apache reload the entire module from scratch 
on every request - and then you may as well be using mod_cgi..

[snip]

>
>
>* Despite numerous heroic efforts, HTTP HEAD requests are still screwed!
>Apache::Registry serves HEAD + Body, and Geoffrey's Apache::HEADRegistry
>doesn't work with redirects and 404's (I get like two headers and 3
>bodies for 404's. Now that's verbose  :-))
>
No real mod_perl problem on that - that's a problem (or maybe 
intentional functionality?) in Apache::Registry and Apache::HEADRegistry...

>
>These are the - painful - issues I discovered during the last 6 month of
>intensive mod_perl coding. I hope they'll be fixed at some point because
>mod_perl could be so popular if they were!
>
I dunno...  I think that the main reason mod_perl isn't as popular as 
mod_php is because PHP is SSI based, making it more appetizing to lots 
of developers who don't have such good access to the server, or who 
don't want to understand the internals of Apache module writing 
(remember that that's the real point of mod_perl: to write Apache 
modules in Perl instead of C), whereas mod_perl means pre-writing 
modules and having to reload the server (or use a top-heavy module like 
Apache::StatInc) every time you want to change your code.
Of course, that's the power of mod_perl over mod_php.  And I know that 
personally, it's why I use it.  As to the  non-ISP friendliness 
disadvantage, that's a critical issue, but I think it's being 
re-analyzed for mod_perl 2.0


Just my two agorot (a bit less than $0.005 now, I think, although due to 
that the smallest currency here is actually _5_ agorot :-) )

  Issac

Reply via email to