in reply to CGI::start_html and mod_perl

It is not an error but a warning, so you can "hide" it by not activating warnings. I have seen this type of error many times, but other than it is estheticaly not pleasing, it does not necessarily mean that something is badly wrong.

IMO, all it means is that you were using a variable before it was properly initialised, IOW the variable exists but has no content (yet): so either there is something wrong with the logic flow of your program or you indeed intended to use the variable without content.

I have seen it sometimes appear in complicated print statements which internally are complied as a lot of concatenation operations. Lots of times however it is mostly harmless.

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Replies are listed 'Best First'.
Re^2: CGI::start_html and mod_perl
by davorg (Chancellor) on Jul 06, 2006 at 07:50 UTC
    It is not an error but a warning, so you can "hide" it by not activating warnings

    In my opinion, hiding warnings is a terrible idea. And the worst way to do it is to just remove use warnings from the code. That stops you from knowing about any warnings that might appear anywhere in your code. That sounds like coding without a safety net for no good reason.

    If you do have a piece of code where you want to "hide" a warning then just hide that specific warning in that specific piece of code. In this instance, that might look a bit like this:

    { no warnings 'uninitialized'; print start_html(...); }

    That way you still get the benefit of use warnings throughout most of your code.

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

      I fully agree with your point of view. It is only once you have ascertained that the warning has no cause in a programming error that you should "hide" it.

      CountZero

      "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law