NAME ^

src/classes/Role.pir - methods for the Role class

Description ^

This class represents a role in Perl 6. It is not substitutable for a Parrot role, nor does it subclass it. Instead, it provides a way to get at a Parrot level role through a multiple dispatch (or perhaps from a cache). You can see it as a kind of "role factory", which manufactures roles of a particular short name for a particular set of parameters.

Methods ^

!add_variant
Adds a parameterized variant of the role.
!select
Selects a variant of the role to do based upon the supplied parameters.
ACCEPTS(topic)
Checks if the given topic does the role.
postcircumfix:<[ ]>
Selects a role based upon type.
new
Puns the role and instantiates the punned class.
elements (vtable method)
Gives the number of possible parameterized roles we can select from (but really just here so postcircumfix:[ ] doesn't explode).

Methods on Parrot Roles ^

We also add some methods to the Parrot roles.

new
Puns the role to a class and instantiates it.
ACCEPTS

POD ERRORS ^

Hey! The above document had some coding errors, which are explained below:

Around line 206:
'=item' outside of any '=over'


parrot