in reply to Calling a function that may not be there...
orif (defined &top) { ⊤ }
The defined operator returns true if &top is defined, false if there is no such function. This would appear to be exactly what you are looking for.&top if defined ⊤
You should avoid the solutions based on can for two reasons: First, they will be less efficient, and second they may have additional semantics that you don't want.
The AUTOLOAD thing is utterly ridiculous. It's like squishing a bug with a pile driver.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Calling a function that may not be there...
by knobunc (Pilgrim) on Mar 27, 2001 at 19:51 UTC | |
by Dominus (Parson) on Mar 27, 2001 at 21:26 UTC |