role X::Syntax::Obsolete
src
role X::Syntax::Obsolete does X::Syntax { }
Syntax error thrown when obsolete (mostly Perl 5) syntax is detected.
For example
new Array;
dies with
===SORRY!===
Unsupported use of C++ constructor syntax; in Perl 6 please use method call syntax
Methods
old
method old() returns Str:D
Returns a textual description of the obsolete syntax construct
replacement
method replacement() returns Str:D
Describes what to use instead of the obsolete syntax.
when
method when() returns Str:D
Returns a string describing the state of the language (usually
" in Perl 6" ).