Closed anonyno closed 2 years ago
maybe i just don't understand Perl but why is
print;
okay but notdie;
. i need to usedie();
for it not to complain.
This is indeed a bug. I've marked this ticket as such.
Also
print 'example'
is okay even though "All subroutines must use parentheses".
print
(and die
) are not "subroutines," they are "keywords." Keywords are the reserved barewords provided by the language, also referred to as "builtins" or "builtin functions." They do not need parenthesis by default because we are aware of their parsing rules.
User-created functions ("subroutines") require parenthesis so we can adequately figure out how to lex and parse them. Subroutine prototypes allow the user to give the perl lexer additional parsing rules so it can avoid parenthesis but that makes it very difficult to statically parse because you need to go into compilation mode to introduce these new prototypes and understand them. This is why Guacamole doesn't support subroutine prototypes and requires all subroutines (user-provided functions) to include parenthesis.
die
is now supported.
maybe i just don't understand Perl but why is
print;
okay but notdie;
. i need to usedie();
for it not to complain.Also
print 'example'
is okay even though "All subroutines must use parentheses".