in reply to Distinguish method/function call during debugger?

Is it even possible? What about

sub Deb::func { print("Deb!\n"); } $obj = bless {}, 'Bar'; $obj->Deb::func();
and even
sub Foo::func { print("Foo!\n"); } @Deb::ISA = 'Foo'; $obj = bless {}, 'Bar'; $obj->Deb::func();

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

    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.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

      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]

        ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊