
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] perl hashes
>>>>> "BR" == Brett Robson <b-robson@example.com> writes:
BR> My main concern is Larry's diversions eg
BR> I came across this yesterday while reading about references p
BR> 244 "...which we will call "thingy", in honour of that thingy
BR> that hangs down in the back of your throat"
BR> The classic p 12 "Unless you're using artificial intelligence
BR> to model a solipsistic philosopher" try explaining that to my
BR> English impaired colleagues
BR> IMHO diversions like that have no place in a computer text.
But perl is a (di|per)version itself :) What about `goto &NAME':
$ perldoc -f goto
[...]
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 @example.com 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 @example.com in the current subroutine are propagated to
the other subroutine.) After the "goto", not even "caller" will
be able to tell that this routine was called first.
There must be more examples. Pity that Simon is not around anymore...
--
Viktor
Home |
Main Index |
Thread Index