in reply to Getting Confused with the '->' operator
Your second example
$Person->name('Homer') ->job('safety inspector') ->wife('Marge') ->fav_food('Duff');
seems to be just plain weird. I might be (and almost certainly am) missing something - the same thing as you in that case :) - but I read this as "execute the method fav_food on the object returned by executing wife on the object returned by executing job on the object returned by executing name on the thingy referenced in $person" (arguments left out to save what little shreds of clarity remaining). Beats me. Help.
CU
Robartes -
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Getting Confused with the '->' operator
by charnos (Friar) on Oct 01, 2002 at 13:34 UTC |