On 12/10/2014 04:55 PM, Andy Bach wrote:

On Wed, Dec 10, 2014 at 3:21 PM, Uri Guttman <u...@stemsystems.com <mailto:u...@stemsystems.com>> wrote:

    the way to do that is to modify @_ in the calling routine and then
    calling the sub with &. in your


    the win there isn't just sharing the code but the return from the
    error handler goes back to the user's caller and not to a sub in
    the module.


Yes, that would be useful too. I must have forgot that aspect of "&" calls ;->


it is called magic goto for that reason. it isn't really a sub call but a replacement of the current sub with the called one. no stack work is done and @_ is passed as is. it is very valuable when used like that but rarely needed. when you see newbies making calls like foo; and not know why that is dangerous, you have to teach them about it.

uri

Reply via email to