Re: alias a function

2004-04-08 Thread JupiterHost.Net
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

Re: alias a function

2004-04-08 Thread JupiterHost.Net
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

Re: alias a function

2004-04-08 Thread david
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 >>>

Re: alias a function

2004-04-08 Thread Jenda Krynicky
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

Re: alias a function

2004-04-08 Thread JupiterHost.Net
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

Re: alias a function

2004-04-08 Thread david
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