As currently promulgated, catch "Foo" {} will always catch,
because "Foo" is true.  Will this cause confusion for developers
who meant to say catch Foo {}?  And what happens when someone
says catch "Foo", "Bar" {}?

We can't just say that catch Foo {} and catch "Foo" {} are the
same thing, or that catch "Foo" {} is outlawed, because catch
$test {} is supposed to work even if $test *is* a string.

Or can we?  I'm not a parser expert.

And while I'm on the topic, how likely is it that

        catch <expr> { ... }

is going to be parsable?  Does Perl 5 do that in any cases?
If it's really unlikely, we should go back to the trap clause
(but I don't want to do that any more, I've found that the
<expr> for works very well in the examples in the RFC).

Yours, &c, Tony Olekshy

Reply via email to