in reply to foreach loop on one line

The very first line of the documentation for Statement Modifiers (i.e. the postfix forms of if, unless, foreach, while, etc) says:

Any simple statement may optionally be followed by a SINGLE modifier, just before the terminating semicolon (or block ending).

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name