in reply to Tail Recursion in Perl
Excerpt:
The "goto &NAME" form is quite different from the other forms
of "goto". In fact, it isn’t a goto in the normal sense at
all, and doesn’t have the stigma associated with other gotos.
Instead, it exits the current subroutine (losing any changes
set by local()) and immediately calls in its place the named
subroutine using the current value of @_. This is used by
"AUTOLOAD" subroutines that wish to load another subroutine and
then pretend that the other subroutine had been called in the
first place (except that any modifications to @_ in the current
subroutine are propagated to the other subroutine.) After the
"goto", not even "caller" will be able to tell that this rou-
tine was called first.
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Tail Recursion in Perl
by dragonchild (Archbishop) on Dec 31, 2003 at 19:23 UTC | |
by Anonymous Monk on Dec 31, 2003 at 19:55 UTC | |
by LunaticLeo (Scribe) on Dec 31, 2003 at 20:36 UTC | |
by bsb (Priest) on Jan 02, 2004 at 00:50 UTC | |
|
Re: Re: Tail Recursion in Perl
by stvn (Monsignor) on Jan 01, 2004 at 01:42 UTC | |
by bsb (Priest) on Jan 02, 2004 at 01:01 UTC | |
by sleepingsquirrel (Chaplain) on Jan 04, 2004 at 03:42 UTC |