The docs currently imply that the block form syntax is only available at compile-time:
It is prototyped to take a subroutine reference as an argument. Thus, it can be called in block form:
But I think it needs to be explicitly stated that loading Capture::Tiny at runtime necessitates wrapping the block in an anonymous sub: Capture::Tiny::capture(sub { ... }).
Found somebody else who ran into the same issue: https://www.perlmonks.org/?node_id=870439
Edit: found another one: https://www.perlmonks.org/?node_id=1210478