TITLE ^

Signature - Perl 6 Signature class

DESCRIPTION ^

This file sets up the Perl 6 Signature class.

GUTS ^

This class will evolve over time as we understand signatures and how we will expose there insides better. For now, a signature under the hood is just an array of hashes, with each hash being a "descriptor" for something that is bindable. Its keys are as follows.

* name - string holding the name of the thing we're binding to, if any * type - the class or role type of the parameter; this references the actual type object rather than just naming it, and may well be parametric (but that will have been resolved already) * constraints - any additional "where" refinement types on the parameter; will be a junction of types * invocant - is this the invocant (as in, self for a method, not multi) * multi_invocant - is this an invocant for the purpose of MMD * optional - is this an optional parameter? * slurpy - is this a slurpy parameter?

Again, this probably isn't definitive either, but it'll get us going.

Methods ^

!create

Used to create a new signature object with the given paramter descriptors.

params

Get the array of parameter describing hashes.


parrot