Rules / Types, classes & roles / metamodel
Metamodel::ParametricRoleGroupHOW Reference
Represents a group of roles with different parameterizations
What it is #
Examples, run three ways #
Every example below comes from the official documentation, together with the output that documentation asserts. Each was then executed by Rakudo and by Raku++ when this page was built. Where the three agree, one result is shown; where they do not, all three are — because which of them is wrong is exactly the information worth having.
1 no-output · 2 rakupp-differs
class Metamodel::ParametricRoleGroupHOW
does Metamodel::Naming
does Metamodel::Documenting
does Metamodel::Stashing
does Metamodel::TypePretense
does Metamodel::RolePunning
does Metamodel::BoolificationProtocol {}Not executed: the documentation states no expected output for this example.
(role Zape[::T] {}).HOW.say; # OUTPUT: «Perl6::Metamodel::ParametricRoleHOW.new»
Zape.HOW.say ; # OUTPUT: «Perl6::Metamodel::ParametricRoleGroupHOW.new»Documentation
Perl6::Metamodel::ParametricRoleHOW.new
Perl6::Metamodel::ParametricRoleGroupHOW.new
Rakudo
Perl6::Metamodel::ParametricRoleHOW.new
Perl6::Metamodel::ParametricRoleGroupHOW.new
Raku++
Raku++ disagrees with both the documentation and Rakudo — a defect.
my \zape := Metamodel::ParametricRoleGroupHOW.new_type( name => "zape"); my \zipi := Metamodel::ParametricRoleHOW.new_type( name => "zipi", group => zape); say zipi.HOW; # OUTPUT: «Perl6::Metamodel::ParametricRoleHOW.new»
Documentation
Perl6::Metamodel::ParametricRoleHOW.new
Rakudo
Perl6::Metamodel::ParametricRoleHOW.new
Raku++
(Metamodel::ClassHOW)
Raku++ disagrees with both the documentation and Rakudo — a defect.