perl6/doc/lib/X/Syntax/Obsolete
doc src
(title) role X::Syntax::Obsolete
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
(head2) old
method old() returns Str:D
Returns a textual description of the obsolete syntax construct
(head2) replacement
method replacement() returns Str:D
Describes what to use instead of the obsolete syntax.
(head2) when
method when() returns Str:D
Returns a string describing the state of the language (usually
" in Perl 6" ).