Geoffrey Young wrote:
2. make the two interchangable via aliasing, so setting
/$Apache::err(str)?/ will also set /$APR::err(str)?/


that's still my favorite if we can swing it.

I'm not sure about it. so let's say we create the alias, people get used to use $Apache::err everywhere, so we end up with $Apache::err APR code that may work outside mod_perl. That's like not having $APR::err at all and just making the user confused why the two seems to work, and which one is the right one to use.


3. use just one set /$ModPerl::err(str)?/

4. use one set and shortcut it to /$MP::err(str)?/


I don't think we can really do that with APR.  once the APR interface is
capable of being separated it makes little sense to have things in the MP::
or any other mod_perl related namespace.

Yes, but you are doomed to have /$Apache::err(str)?/ leaked into APR code, so IMHO it makes no difference. That's why I suggested to just use modperl in the name. or even just some other name, e.g. ASF::err :)


So speak up before we started to change everything, tell which one do
you like and if you have other ideas.


not really.  can you explain exactly what the issue is with $!?  I never
quite understood why it wouldn't work and today I was playing with
BerkeleyDB and saw that it relies on $! to communicate errors.  I could have
sworn that a few other modules used its dual-value nature as well, but I
could be wrong.

We can use $! as long as we can map APR/Apache error codes to POSIX errno codes. $! is a dual variable, which is really errno(3) in the numerical context, and strerror(3) in the string context. Since we have error messages/codes which aren't POSIX complient, we can't consistently use it.


I've tried to convinve p5p to extend its function to allow custom user magic, but first, most those who cared weren't sure it was a good idea, second, we need to support older perls which won't have it anyway.

So we end up with coming up with our own error variables. I suppose we could even make that new variable a dual one just like $!.


__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com

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



Reply via email to