Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make lack of unit a 'real' deprecation message
  • Loading branch information
lizmat committed May 19, 2015
1 parent 7803bf0 commit 5278e45
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Perl6/Grammar.nqp
Expand Up @@ -2167,7 +2167,12 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
if $*PKGDECL eq 'package' {
$/.CURSOR.panic('This appears to be Perl 5 code. If you intended it to be Perl 6 code, please use a Perl 6 style declaration like "unit package Foo;" or "unit module Foo;", or use the block form instead of the semicolon form.');
}
$/.CURSOR.worry("Semicolon form without 'unit' declarator is deprecated");
$*W.DEPRECATED($/,
"'unit $*PKGDECL'",
'2015.04',
'2015.09',
:what("Semicolon form of '$*PKGDECL' without 'unit'"),
);
}
unless $outer =:= $*UNIT {
$/.CURSOR.typed_panic("X::UnitScope::Invalid", what => $*PKGDECL, where => "in a subscope");
Expand Down

0 comments on commit 5278e45

Please sign in to comment.