Here's a series of questions/confirmation requests about how properties
work (but specifically run-time properties, not traits):

Use C<but> to assign a property to a I<value>:

    $a = $b but foo;       # $a has property foo, $b does not

Properties are just out-of-band methods:

    if $x.foo { print "$x has property foo" }
    $x.bar = 1;   # Or $x = $x but bar

Which makes meta-properties (eg. C<nothing>) easy to fathom.

(That one seems a little dangerous from an error checking point of view.
Is there such thing as a 'method not found' error?)

To get a hash of out-of-band properties, use either the C<btw> or the
C<props> method, depending on whether our language designers are feeling
cute.

Luke

Reply via email to