> At 08:54 AM 10/20/99 +0200, Stas Bekman wrote:
> >> Besides all the information at perl.apache.org, can you recommend any good
> >> resources (book, web pages) that stand out in your memory as being very
> >> helpful when you were starting out?
> >
> >I'm not sure why have you discarded the docs at perl.apache.org so fast,
> >did you read them at all? Did you take a look at the guide?
> >perl.apache.org/guide 
> 
> I said "besides", not that I discarded the docs you mention.

99% of the info you can find about mod_perl located at perl.apache.org,
there are a few articles written here and there, but if you don't find the
info *about modperl* at modperl site, I'm not sure you will find it
elsewhere...

See below for the info about the book...
 
> I did read the Guide.  It's helpful and a wonderful bit of work.  But I
> still have questions and I haven't been at this long enough to grok it all
> in.  For example, you say:
> 
> "Perl's exit() built-in function cannot be used in mod_perl scripts."
> 
> I started to edit my scripts per the examples in the Guide, but then
> decided to try it first, and, it turns out, exit() works without explicitly
> overriding in my script.  Reading perldoc Apache::Registry again, I see
> that exit is overridden automatically.  

I beg your pardon, did you read the whole section or only the first
sentence?  I'm not hiding it, in third para of: 
http://perl.apache.org/guide/porting.html#Using_exit_ clearly written the
following: 

<QUOTE>
Note that if you run the script under Apache::Registry, The Apache
function exit() overrides the Perl core built-in function. While you see
the exit() listed in @EXPORT_OK of Apache package, Apache::Registry makes
something you don't see and imports this function for you. This means that
if your script is running under Apache::Registry handler (Apache::PerlRun
as well), you don't have to worry about exit().
</QUOTE>

> Confusing to a newcomer, no?

If you read the whole thing, definitely not confusing.

Sorry if I sound harsh, But it's a known excuse some folks use to get a
free ride: "I read the docs, and didn't find the answer. Can you please
tell me...". 

Again, I'm not trying to offend you, Bill. Just a request to truly RTFM
before asking questions. I think it's pretty fair to the folks who spend
their time to answer questions.

> My CGI scripts were, in a BEGIN block, opening STDERR to a file (and using
> that file as a lock file).  But now I see that STDERR is reset next time my
> script is called.  Where can I read about that and other similar behavior
> that I should be aware of?

In the wonderful book Doug and Lincoln wrote, see www.modperl.com

STDERR is being tied by apache to error_log file. I'll add this note to
the guide.

BEGIN blocks are being run only once per process life:
http://perl.apache.org/guide/porting.html#BEGIN_blocks

> How do I find out why die() is causing a diagnostics message being sent to
> the client?  I'm not using Carp or any __WARN__ or __DIE__ handlers in my
> script or in the startup.pl file.

I beleive, it's because of your previous statement -- you break the tied
STDERR and all the output goes to STDOUT. Don't mungle with STDERR unless
you know what are you doing. Though it can be because of another reason...

Hope this helps...

_______________________________________________________________________
Stas Bekman  mailto:[EMAIL PROTECTED]    www.singlesheaven.com/stas  
Perl,CGI,Apache,Linux,Web,Java,PC at  www.singlesheaven.com/stas/TULARC
www.apache.org  & www.perl.com  == www.modperl.com  ||  perl.apache.org
single o-> + single o-+ = singlesheaven    http://www.singlesheaven.com

Reply via email to