in reply to Re: Distinguish method/function call during debugger?
in thread Distinguish method/function call during debugger?

Yeah, I don't actually expect to see that one in practice. Not with the code i'm instrumenting. If you want to go to that level, then there's also $obj->$code_ref and $obj->$string.

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Replies are listed 'Best First'.
Re^3: Distinguish method/function call during debugger?
by ikegami (Patriarch) on Feb 23, 2006 at 17:17 UTC

    My point was that Perl has so many call syntaxes that I doubt it knows how a function was called.

    By the way, I'm suprised you don't use it. In just about every inheriting class I write, I use $class->SUPER::new().

      Oh. You're wrong then. The information is clearly there.

      ~$ perl -MO=Concise -e '$o->foo' entersub pushmark ex-rv2sv gvsv[*o] s method_named[PVIV "foo"] ~$ perl -MO=Concise -e 'foo( $o )' entersub ex-list pushmark ex-rv2sv gvsv[*o] ex-rv2cv gv[*foo]

      ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

        You only showed that Perl knows how it should call a function, not that the it knows how a function was called. Perl obviously has to know how to call a function (since one checks @ISA and the other doesn't), but that doesn't mean it keeps track of how a function was called. Despite your claim, you haven't shown me wrong (yet).

        Update: I was unhappy with my original wording. I rephrased what I wrote to make more sense.