in reply to Re: Good use for prototypes. On methods no less!
in thread Good use for prototypes. On methods no less!
Prototypes do nothing on method calls. There is plenty of talk about this in various forums. So they do not affect good users.
If someone tries to call UNIVERSAL::isa(...) with arguments (what use would it be otherwise) they will get the compile time error.
For example, this:
works, but this:> perl -e 'sub method() { }; main->method(1, 2, 3);'
does not.> perl -e 'sub method() { }; main::method("main", 1, 2, 3);' Too many arguments for main::method at -e line 1, near "3)" Execution of -e aborted due to compilation errors.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Good use for prototypes. On methods no less!
by Eliya (Vicar) on Jun 01, 2012 at 20:04 UTC |
In Section
Seekers of Perl Wisdom