On 5 February 2012 18:44, Tom Christiansen <tchrist@perl.com> wrote: >> Why? You think throwing a fatal is preferred? They do nothing, they >> have no affect. > > How can this not be a bug? My personal feeling on this is that it matches the general tradition of perl not croaking when no harm is done by not croaking. Since the operators are meaningless why break the code over a typo? I did not implement the feature, but considering the warning was deliberately added I assume it is a feature. > $ perl -E 'no warnings; use re "/g"; say "gosh that was ok, then, eh?"' > Unknown regular expression flag "g" at -e line 1 > gosh that was ok, then, eh? > > $ perl -E 'use warnings FATAL => "all"; use re "/g"; say "gosh that was ok, then, eh?"' > Unknown regular expression flag "g" at -e line 1 > gosh that was ok, then, eh? > > $ perl -E 'use warnings FATAL => "all"; use re "/WTF"; say "gosh that was ok, then, eh?"' > Unknown regular expression flag "W" at -e line 1 > gosh that was ok, then, eh? > > I can't disable them. > I can't trap them. > They're stupid noise. So then fix your code. > Yes, I want a fatal. Well, I personally could see it either way, and am inclined slightly towards the no-die policy. > I certainly want to be *able* to have a fatal. > > I think they should be a fatal. > > They most definitely shouldn't be noise. Warnings are noise? Yves -- perl -Mre=debug -e "/just|another|perl|hacker/"Thread Previous | Thread Next