The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
use v6-perlito;

class Other {
    has $.a;
    method subr() { say 'ok ', $.a };
}

class Main {
    
    say '1..3';
    say 'ok 1 - load ok';

    my $other = Other.new( a => 2 );
    $other.subr();

    $other.a = 3;
    say 'ok ', $other.a;
}