in reply to How to find out the path of which package called a function?

Have you looked at caller? It gives you the line number, filename and package of your callers.

One day, I hope Perl will accept negative arguments to the caller function as well and still give the correct results, always.

Replies are listed 'Best First'.
Re^2: How to find out the path of which package called a function?
by rapide (Beadle) on Sep 03, 2008 at 08:29 UTC
    You Sir, you are a lifesavior!
    Did not know of "caller". It seems like its natively installed also in perl version 5.7 so its perfect for me. Thanks a lot Corion!

      The caller function has been in Perl since at least Perl 5.0.

      As an aside, there is no production release of Perl with the version number 5.7. The old production release is Perl 5.8 with the current minor version 5.8.8 and the current production release is Perl 5.10 with the current minor version 5.10.0.