This page was generated by Text::SmartLinks v0.01 at 2014-07-22 23:01:06 GMT.
(syn 8a8859e)
  [ Index of Synopses ]

TITLE

DRAFT: Synopsis 32: Setting Library - Callable

AUTHORS

    Tim Nelson <wayland@wayland.id.au>
    Larry Wall <larry@wall.org>

VERSION

    Created: 26 Feb 2009
    Last Modified: 5 Nov 2013
    Version: 3

The document is a draft.

If you read the HTML version, it is generated from the Pod in the specs repository under https://github.com/perl6/specs/blob/master/S32-setting-library/Callable.pod so edit it there in the git repository if you would like to make changes.

This document documents Code, Block, Signature, Capture, Routine, Sub, Method, Submethod, and Macro.

Callable

    role Callable {...}

The Callable role implies the ability to support postcircumfix:<( )>.

Code

    class Code does Callable {...}

Base class for all executable objects.

signature
 method signature( --> Signature )
assuming
 method assuming( Code $executable: *@curried_positionals, *%curried_named --> Code)

assuming primes $executable, returning a Code object that, when executed, will use curried arguments as well as any additionally supplied arguments. See "Priming" in S06.

defined
 method defined( --> Bool )

For Code, the .defined method returns whether a body has been defined. A body consisting only of ..., !!!, or ??? (with optional message arguments) does not count as defined.

To test if a name has been declared, look up the symbol in the appropriate symbol table.

Block

    # Executable objects that have lexical scopes
    class Block is Code does Callable {
        method next()   {...}
        method last()   {...}
        method redo()   {...}
        method leave()  {...}
        method labels() {...}
        method as()     {...} # See L<S12/Introspection> and L<S02/Value types>
    }

Signature

 class Signature {...}

The Signature class is used for function parameters, as the left-hand side of a binding, and for the argument to declarators like my. See "Signature objects" in S02, "Signatures" in S06, and "Signature Introspection" in S06

Capture

 class Capture does Positional does Associative {...}

The Capture class is used for the arguments of function calls and the right-hand side of a binding. See "Parcels, parameters, and Captures" in S02

WrapHandle

 class WrapHandle {...}

Routine

 class Routine is Block {
      method wrap(Code $code --> WrapHandle ) {...}
      method unwrap(Wraphandle $original --> Routine ) {...}
      method name( --> Str ) {...}
      method multi( --> Bool ) {...}
 }
unwrap

See "Wrapping" in S06.

wrap
 method wrap(Code $code) {...}

See "Wrapping" in S06.

Sub

    class Sub is Routine {...}

Method

    class Method is Routine {...}

Submethod

    class Submethod is Routine {...}

Macro

    class Macro is Routine {...}

Additions

Please post errors and feedback to perl6-language. If you are making a general laundry list, please separate messages by topic.

[ Top ]   [ Index of Synopses ]