in reply to coding a subroutine as both method and regular function
I'll leave it to you to discover how hairy _self_or_default is.sub foo { my ($self, @args) = _self_or_default(@_); # continue coding OO-style }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: coding a subroutine as both method and regular function
by leocharre (Priest) on Mar 22, 2007 at 16:15 UTC |