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 progr
# New Ticket Created by Daniel Ruoso
# Please include the string: [perl #65412]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=65412 >
rakudo: class A { has $!rx; method do { $!rx = / some
regex / }; }; A.new.do; #pmichaud