-
Notifications
You must be signed in to change notification settings - Fork 560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function prototypes #158
Comments
From @vlbrownIf I declare (and or define) my function before I use it sub func() { $returned = func(17); print $returned; Then I get a fatal error if the protptype doesn't match. Too many arguments for main::func at foo.pl line 7, near "17)" However, if the function is not declared until after the call $returned = func(17); print $returned; sub func() { There is no error (fatal or otherwise). This violates the Principle of Least Astonishment. I could buy the argument that this is Difficult To Solve. I think it's a bug Nevertheless, it would be useful at least if -w would warn about Perl Info
|
Migrated from rt.perl.org#963 (status was 'resolved')
Searchable as RT963$
The text was updated successfully, but these errors were encountered: