Skip to content

[doc] Explicitly state block form can only be used at compile time #65

@grr

Description

@grr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions