that's one feature of goto &foo and another has to do with transfering the
current call to another so caller is fooled to believe the function is
actually called directly
Excellent, thansk for the info David!
I'll have to perldoc -f goto since
I'm not realy familiar with it and its own issues
goto() just kind of uses the current @_ if I remeber right, correct?
Not just that. If all you wanted was to call foo with the current @_
youd write it like this:
sub bar { &foo; }
The
goto &foo;
does more. It replaces bar() by foo() in call stack. So if foo()
calls caller() or croaks() it
Jupiterhost.Net wrote:
>
>
> david wrote:
>
>> Jupiterhost.Net wrote:
>>
>>
>>>Hello list,
>>>
>>>I was looking into the best way (and for what reasons) you'd create an
>>>"alais" function.
>>>
>>>For example:
>>>
>>>If you want foo() and bar() to be able to be used interchangeably would
>>>
From: "JupiterHost.Net" <[EMAIL PROTECTED]>
> david wrote:
> > for these simple examples, it doesn't matter much and i would go
> > with the first method. functionality wise, they are pretty much the
> > same but there are differences that you might want to observe when
> > your foo function gets m
david wrote:
Jupiterhost.Net wrote:
Hello list,
I was looking into the best way (and for what reasons) you'd create an
"alais" function.
For example:
If you want foo() and bar() to be able to be used interchangeably would
it be best to do:
sub foo { return "Howdy $_[0]"; }
sub bar { retur
Jupiterhost.Net wrote:
> Hello list,
>
> I was looking into the best way (and for what reasons) you'd create an
> "alais" function.
>
> For example:
>
> If you want foo() and bar() to be able to be used interchangeably would
> it be best to do:
>
> sub foo { return "Howdy $_[0]"; }
> sub