Documentation for trait is DEPRECATED
assembled from the following pages:
Class: Routine §
From Routine
(Routine) trait is DEPRECATED §
multi sub trait_mod:<is>(Routine , :!)
Marks a routine as deprecated, optionally with a message what to use instead.
This code
sub f() is DEPRECATED('the literal 42') say f();
produces this output:
42 Saw 1 occurrence of deprecated code. ================================================================================ Sub f (from GLOBAL) seen at: deprecated.p6, line 2 Please use the literal 42 instead. -------------------------------------------------------------------------------- Please contact the author to have these occurrences of deprecated code adapted, so that this message will disappear!