in reply to Re^2: What's so bad about &function(...)?
in thread What's so bad about &function(...)?
Yes, but not everyone programs in a vacuum. Sooner or later they'll start using code which does have prototypes. Imagine, for example, that they start using Test::More. Those functions all have prototypes and using the leading ampersand is sure to bring them woe. Imagine, for example, typing "is" instead of "ok":
&is(some_func(3,4));The prototype is now disabled so they don't get the compile-time failure telling them that the test function has been called incorrectly. If you're new to testing or that's buried in bunch of other tests, it can be quite difficult to figure out.
Cheers,
Ovid
New address of my CGI Course.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: What's so bad about &function(...)?
by merlyn (Sage) on Dec 07, 2005 at 19:47 UTC | |
|
Re^4: What's so bad about &function(...)?
by sauoq (Abbot) on Dec 07, 2005 at 23:13 UTC | |
by chromatic (Archbishop) on Dec 08, 2005 at 07:15 UTC | |
by Ovid (Cardinal) on Dec 07, 2005 at 23:42 UTC | |
|
Re^4: What's so bad about &function(...)?
by Perl Mouse (Chaplain) on Dec 08, 2005 at 17:23 UTC |