Metaobject that supports punning of roles.
role Perl6::Metamodel::RolePunning { }
Implements the ability to create objects from Role
s without the intermediate need to use a class. Not intended to be used directly (will in fact error if it's use
d), but via punning of roles, as below. This is also Rakudo specific and not part of the spec.
role A {
method b {
return " punned "
}
} ;
my $ a = A . new ;
say $ a . b ;
Type relations for Metamodel::RolePunning
perl6-type-graph
Metamodel::RolePunning
Metamodel::RolePunning
Mu
Mu
Any
Any
Any->Mu
Metamodel::TypePretense
Metamodel::TypePretense
Metamodel::CurriedRoleHOW
Metamodel::CurriedRoleHOW
Metamodel::CurriedRoleHOW->Metamodel::RolePunning
Metamodel::CurriedRoleHOW->Any
Metamodel::CurriedRoleHOW->Metamodel::TypePretense
Metamodel::Naming
Metamodel::Naming
Metamodel::Documenting
Metamodel::Documenting
Metamodel::Versioning
Metamodel::Versioning
Metamodel::MethodContainer
Metamodel::MethodContainer
Metamodel::PrivateMethodContainer
Metamodel::PrivateMethodContainer
Metamodel::MultiMethodContainer
Metamodel::MultiMethodContainer
Metamodel::AttributeContainer
Metamodel::AttributeContainer
Metamodel::RoleContainer
Metamodel::RoleContainer
Metamodel::MultipleInheritance
Metamodel::MultipleInheritance
Metamodel::Stashing
Metamodel::Stashing
Metamodel::ParametricRoleHOW
Metamodel::ParametricRoleHOW
Metamodel::ParametricRoleHOW->Metamodel::RolePunning
Metamodel::ParametricRoleHOW->Any
Metamodel::ParametricRoleHOW->Metamodel::TypePretense
Metamodel::ParametricRoleHOW->Metamodel::Naming
Metamodel::ParametricRoleHOW->Metamodel::Documenting
Metamodel::ParametricRoleHOW->Metamodel::Versioning
Metamodel::ParametricRoleHOW->Metamodel::MethodContainer
Metamodel::ParametricRoleHOW->Metamodel::PrivateMethodContainer
Metamodel::ParametricRoleHOW->Metamodel::MultiMethodContainer
Metamodel::ParametricRoleHOW->Metamodel::AttributeContainer
Metamodel::ParametricRoleHOW->Metamodel::RoleContainer
Metamodel::ParametricRoleHOW->Metamodel::MultipleInheritance
Metamodel::ParametricRoleHOW->Metamodel::Stashing
Metamodel::BoolificationProtocol
Metamodel::BoolificationProtocol
Metamodel::ParametricRoleGroupHOW
Metamodel::ParametricRoleGroupHOW
Metamodel::ParametricRoleGroupHOW->Metamodel::RolePunning
Metamodel::ParametricRoleGroupHOW->Any
Metamodel::ParametricRoleGroupHOW->Metamodel::TypePretense
Metamodel::ParametricRoleGroupHOW->Metamodel::Naming
Metamodel::ParametricRoleGroupHOW->Metamodel::Stashing
Metamodel::ParametricRoleGroupHOW->Metamodel::BoolificationProtocol
Expand above chart