![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^2: Far More than Everything You've Ever Wanted to Know about Prototypes in Perl -- by Tom Christiansenby Crackers2 (Parson) |
on Oct 01, 2010 at 23:33 UTC ( #863023=note: print w/replies, xml ) | Need Help?? |
the situation of declaring a proto with sub foobar($); and then calling it with foo(@a) and expecting that to throw an error rather than evaluating the array in scalar context. I'd argue that the more common expectation is that this should just use the first element of @a, which is what would happen if there was no prototype. Which is what I've seen often quoted as the biggest problem with perl prototypes; instead of enforcing subroutine arguments, it changes the way arguments are parsed.
In Section
Tutorials
|
|