Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
> @_ probably wont be populated within signatured subroutines
This desire seems to originate from the performance impact of populating @_. But this will break some compatibility to older code and make migration harder. May I suggest a compromise to scan the functions body for the use of @_ and to dynamically decide then? Attaching a flag to the code-ref which is evaluated by the signature code once the parser encounters @_ shouldn't be too difficult. I hope you all have in mind that goto &sub relies on @_. So does the debugger via @DB:_ for call stack traces. As a side note: JS has a "arguments" array analog to @_ and performance is not JS' problem.
Cheers Rolf In reply to Re^2: Contents of @_ using subroutine signatures with default values (flag)
by LanX
|
|