I would to call my subs without using parentheses around the argument lists. For example, I'd like to use
mypush \@list, $item;
instead of
mypush(\@list, $item);
To accomplish that, I've declared my sub with a prototype.
sub mypush (+@) { push shift, @_ }
In fact, that also allows me to the following, but that's just a bonus:
mypush @list, $item;
Other than having to declare subroutines with prototypes before using them anywhere in the code, is there any serious drawback to using prototypes in Perl?
Code looks definitely cleaner to me. But where in general can prototypes go wrong? When would I regret it?