On Jul 24, 2013, at 12:05 AM, Aristotle Pagaltzis <pagaltzis@gmx.de> wrote: > Now I’m not keen on some new ad-hoc type of smartmatch just because it > would be similar to what other languages offer which already have some > try/catch construct. So I’d just have `catch` follow the same syntax as > any other kind of conditional in Perl: > > my $retry = 0; > while ( $retry < 5 ) { > try { $some->transaction } > catch ( $@->isa('X::Transient') ) { ++$retry } > } > > You’d be able to chain multiple `catch`es, of course. I like it, although I would still like to find a way to avoid the use of a global variable. Best, DavidThread Previous | Thread Next