in reply to How to identify calling class whilst in inherited method

More interestingly,

I have a similar problem, but I want to know which class AND which method called the method in a baseclass. Does anybody know how to use caller() to get this data? I remember running into problems when using an eval() in the calling method.

Thanks.

Marcel

Update: Think I've found it:
sub GetCaller { my $self = shift; my $i = 0; my $result; while (1) { my ($package, $filename, $line, $subroutine) = caller($i++); if (defined($package) && ($package ne "main")) { $result = $subroutine; } else { last; } }; return $result; }
I ignore "main" because this is always a startup script.