I skimmed through S06 and I found no convenient way to use the return
value of sub/method in it's POST blocks.

Since they can (and should) be used (among other things) to check the
sub's/method's return value, I'd like to propose that the return value
of a sub is given as the argument to POST block, so that you can write

sub my_sqrt ($x) {
    # calculation with many possible return pathes

    POST -> $result {
        $result * $result == $x
    }
}

I don't really know what do when the sub is left through an exception,
maybe it should search for a POST multi with empty arguments? (or do
exceptions ignore POST blocks anyway?)

Cheers,
Moritz

-- 
Moritz Lenz
http://moritz.faui2k3.org/ |  http://perl-6.de/

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to