in reply to conditional catch-blocks 'try {} catch(COND) { }'
Just kibitzing on your choices, but option one just feels . . . bleh. Can't articulate why but it just doesn't . . . feel right; having the extra filtering sub inside the block . . . meh.
WRT to the other two, while a bit more verbose I like two more than three (which feels (for lack of a better word) like an overly cute hack (and you're also presuming nothing else has used the name _ for a sub)). It strikes me as much less "hah ha look what games I can play with the parser" and more of a "this is just normal perl with two minor magic keywords" (again, my two cents gut feel when I read).
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: conditional catch-blocks 'try {} catch(COND) { }'
by LanX (Saint) on Sep 20, 2021 at 16:09 UTC | |
by Fletch (Bishop) on Sep 21, 2021 at 01:04 UTC |