Larry Wall wrote:

On Fri, Apr 15, 2005 at 06:04:32PM +0200, Juerd wrote:
: No, Ucfirst it can't be, I think. And ALLCAPS is ugly. @ is taken (and
: ugly). Suggestions?

Maybe we could define an "ok" operator that suppresses only the
*first* warning produced by its argument(s).  Then if you get multiple
warnings, you at least get some indication that you've overgeneralized,
even if the "wrong" warning comes out.  Or maybe it only suppresses
the first warning till you get a second warning, and then it prints both.

Wouldn't some form of trait make more sense:

   my $sql = '...' is ok;

Only trick would be getting "is ok" to bind to the thing in the preceding expression that produces the warning the programmer was expecting. Certainly

   {my $sql = '...'} is ok;

get the point across that warnings are somewhat ignorable for the block, but that starts getting to look a lot like

   {my $sql = '...'} CATCH {default};

Except that one is run-time, the other compile-time.

So one could interpret this thread as a cry for a compile-time exception handler. I see some interesting uses for this in conjunction with C<eval>, but I doubt I'm seeing the whole story.

-- Rod Adams

Reply via email to