More generally, you can specify KEEP and UNDO phasers in a block, that will fire whether the block is left successfully or not. So a typical usage would be `UNDO $dbh.rollback`.
Or are you saying that there are some lines of code at the end checking the post conditions? I'm not exactly sure what that would look like, it sounds a bit insane, especially if you do it for every function. Could you give an example?
Raku has a zero cost way to add arbitrary post processing that kicks in no matter where or how a block of code exits.
This provides a general mechanism accessible by arbitrary user defined control flow related constructs.
Raku also ships with a dozen or so built in constructs such as PRE and POST blocks that are the foundational elements for DbC, plus UNDO and KEEP blocks for transactional semantics, and so on.
(all I can think of is something where you could handle it with a finally-type clause)
maybe a fn shouldn't have post conditions?