in reply to Apache and Perl's -w

It depends on how you have things set up. You can set perl options in the environment variable PERL5OPT, and if you can put that in .htaccess (or the equivalent) with a SetEnv directive.

If you are running things through mod_perl, you probably want the PerlWarn directive.

I don't enable warnings for production code though: I either know about the warnings already, or don't care. I don't need to fill up logs with the same warning over and over again. I turn on warnings for debugging and development and turn it off otherwise.

--
brian d foy <bdfoy@cpan.org>

Replies are listed 'Best First'.
Re^2: Apache and Perl's -w
by hsmyers (Canon) on Feb 16, 2005 at 02:44 UTC
    I wish it were a case of 'how you have things' instead of how the client's ISP has things. Since I always use warnings; until I'm happy with it, I view this as overkill at best. And since it crashes without the '-w' I also view it as a major pain in the posterior. I was hoping that there was some magical reason for this but it doesn't sound like it<sigh>

    --hsm

    "Never try to teach a pig to sing...it wastes your time and it annoys the pig."
      Using my incredible magic powers, I shall guess that you are uploading a perl script with line endings in windows format, to a linux type machine, and not converting the line endings. Thus your shebang actually looks like #!/usr/bin/perl^M and perl^M doesn't exist on the machine so it doesn't run. This of course has nothing to do with apache or perl, but when you add -w infront of the ^M, the kernel can find the appropiate interpreter and perl ignores the ^M.
        Insert sound of my hand forcefully hitting my forehead here. Yes!! Thank you, I feel better now---the slap helped, but the explanation helped even more.

        --hsm

        "Never try to teach a pig to sing...it wastes your time and it annoys the pig."