This code appears to be working for me: $ cat 65412 class A { has $!rx; method do { $!rx = / xyz / } }
A.new.do $ ./perl6 65412 $ I suspect the problem is really with the evalbot attempting to evaluate the returned regex in boolean context after the program has ended (and thus there's no $_ to match the regex against). Closing ticket for now; if it comes up again, feel free to reopen this ticket or a new one. Thanks! Pm