in reply to Remove bless reference or class/package name from method arguments
For these particular examples, argument counting would be sufficient.
sub pow { shift if @_ > 2; return $_[0] ** $_[1]; }
If the number of arguments is unknown (e.g., sum), I do not know how (and do not believe that it is possible) to determine how the sub was invoked.
Good Day,
Dean
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Remove bless reference or class/package name from method arguments
by ikegami (Patriarch) on May 20, 2009 at 14:48 UTC | |
|
Re^2: Remove bless reference or class/package name from method arguments
by binf-jw (Monk) on May 20, 2009 at 10:38 UTC |