Camelia

class X::Role::Initialization

src
    class X::Role::Initialization is Exception { }

 
Thrown when the SomeRole($init) syntax is used, but SomeRole does not have exactly one public attribute. For example
    role R { }; "D2" but R(2)

 
throws the error
    Can only supply an initialization value for a role if it has a single
    public attribute, but this is not the case for 'R'

 

Methods

role

    method role()

 
Returns the role that caused the error.

Perl 6 Tricks and Treats newsletter

Register to the free newsletter now, and get updates and news.
Email:
Name: