Skip to content

$param isa Class, $param does Role and $param type Type traits #6

Open
@schwern

Description

@schwern

As discussed on p5-syntax, Thing $param is ambiguous because one doesn't know if Thing is supposed to be a type or a class or a role and this can have consequences having to do with the order things are loaded.

Add the traits isa, does and type to unambiguously check that the parameter isa class, does a role or is of the type, respectively. There can be multiple checks on one parameter.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions