in reply to Determination of chained method call context
However I strongly agree with ikegami that the desire to complicate your API this way is a code smell suggesting that you're doing something very wrong somewhere.use Want qw(want wantref); # Time passes. sub some_method { if (want('REF') and wantref() eq "OBJECT") { # We are in a chained method call } else { # We are not in a chained method call } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Determination of chained method call context
by Bloodnok (Vicar) on Apr 01, 2009 at 09:17 UTC |