See Original text in context
To allow one class to access the private methods of another class use the trait trusts
. A forward declaration of the trusted class may be required.
;;;say B.new.change;# OUTPUT: «B.new(a => A.new(foo => 42))»
See Original text in context
method trusts( --> List)
Returns a list of types that the invocant trusts.
;say .^name for A.^trusts; # Int