Skip to content

Commit

Permalink
If BUILD is declared as a method rather than a submethod, emit a warn…
Browse files Browse the repository at this point in the history
…ing. Should handle RT#66120.
  • Loading branch information
jnthn committed Jun 30, 2009
1 parent 72ececf commit 1317e53
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/parser/actions.pm
Expand Up @@ -746,6 +746,9 @@ method routine_declarator($/, $key) {
elsif $key eq 'method' {
$past := $<method_def>.ast;
set_block_type($past, 'Method');
if $past.name() eq 'BUILD' {
warn("BUILD declared as a method; you probably wanted to declare it as a submethod.");
}
}
elsif $key eq 'submethod' {
$past := $<method_def>.ast;
Expand Down

0 comments on commit 1317e53

Please sign in to comment.