in reply to Re: -w considered harmful
in thread -w considered harmful

A second point is that you should review perllexwarn specifically the section titled What's wrong with -w and $^W as it will demonstrate scenarios where the local trick you showed above doesnt work. Localizing $^W is in no way a replacment for no/use warnings.

Yves / DeMerphq
---
Software Engineering is Programming when you can't. -- E. W. Dijkstra (RIP)

Replies are listed 'Best First'.
Re: Re: Re: -w considered harmful
by belg4mit (Prior) on Sep 04, 2002 at 15:29 UTC
    I didn't see anything there which doesn't follow from first principles (assuming one is aware of the delocalized nature of the checks done by perl). Not to say it isn't, umm, valid; it's just nothing new.

    --
    perl -pew "s/\b;([mnst])/'$1/g"

      Well the fact that
      local $^W=0;
      won't stop compile time errors wasn't immediately obvious to me... On reflection it made sense, but I imagine more than few reading this thread would be marginally suprised.

      Yves / DeMerphq
      ---
      Software Engineering is Programming when you can't. -- E. W. Dijkstra (RIP)