perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Perrin Harkins" <>
Subject Re: [Fwd: Some questions about mod_perl 2.0]
Date Thu, 30 Dec 2004 03:55:20 GMT
Adam Kennedy said:
> I'm wondering how you plan to make the modifications to the various
> modules that might be effected by this new concept of "two different
> modules (APIs) with the same name"

Adam, this is under heavy discussion right now and is not really resolved.
 There is no solution that solves every problem at the moment.  Please
stand by for further developments on this.

> Some of the docs say that everything is going to need to be thread-safe
> now. Does this mean I can only include CPAN modules if they are
> thread-safe?

If you are running with threads, yes.  At the moment, running the prefork
MPM is preferred on platforms that support it.  Win32 only supports
threads though.

> If so, do you have a solution for detecting if any arbitrary code or
> module is thread-safe or not?

This would be a general perl thing, not a mod_perl thing.  I'm not aware
of any automatic scanning utility for this.

> There are 14 million lines of perl in CPAN, are we going to have to
> rewrite all of them to make them thread-safe before we can use any of
> them with mod_perl 2.0?

If you want to run them with threads, then yes, they will need to be
thread-safe.  Don't run threads if you are not sure about the safety of
the modules you want to use.

> I would imagine that many modules can't be made thread-safe without
> fundamentally changing their APIs as well...

That seems unlikely to me.  There was an example early on of how even very
unsafe APIs like Cwd can be preserved if people care to.

> Finally, a general question. I'm wondering why you chose to keep the
> same namespace for a totally different API, instead of moving to Apache2
> like some other modules like the SQLite modules have done (to SQLite2
> and SQLite3) when their APIs needed to change to match a new underlying
> API.

On the mod_perl users list, Stas and Joe Schaefer were just explaining
some of the problems with the name-changing approach to me.  You may want
to read some of that thread:

- Perrin

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message