trait is DEPRECATED (Attribute)

Documentation for trait is DEPRECATED (Attribute) assembled from the following types:

class Attribute

From Attribute

(Attribute) trait is DEPRECATED (Attribute)

multi sub trait_mod:<is>(Attribute:D $r:$DEPRECATED!)

Marks an attribute as deprecated, optionally with a message what to use instead.

class C {
    has $.foo is DEPRECATED("'bar'");
my $c = C.newfoo => 42 );  # doesn't trigger with initialization (yet) 
say $;                  # does trigger on usage 

After the program is finished, this will show something like this on STDERR:

# Saw 1 occurrence of deprecated code. 
# ===================================== 
# Method foo (from C) seen at: 
# script.pl6, line 5 
# Please use 'bar' instead.