in reply to Trying to understand (caller($i))[4], a.k.a. $hasargs
It indicates a lack of &f.
>perl -E"sub g { say +(caller 0)[4]?'':'no ', 'new @_; ', 0+@_, ' args +: ', @_ } sub f { g(@_) } f('abc');" new @_; 1 args: abc >perl -E"sub g { say +(caller 0)[4]?'':'no ', 'new @_; ', 0+@_, ' args +: ', @_ } sub f { &g } f('abc');" no new @_; 1 args: abc
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Trying to understand (caller($i))[4], a.k.a. $hasargs
by Oberon (Monk) on Feb 13, 2012 at 16:58 UTC |