note
tye
<p>
Thanks. That made me realize my mistake. I was overlooking that [caller] would return <c>__PACKAGE__."::methodName"</c> not just <c>"methodName"</c>.
</p><p>
Yes, it'd be nice if [caller] offered information about under what name the function was called instead of just under what name the function was compiled.
</p><p>
It'd be nice if the following code:
</p><c>
package Source;
sub orig {
# use caller() here
}
package Importer;
@ISA= "Parent";
*dest= \&Source::orig;
package main;
Parent->dest();
</c><p>
Would be able to determine that the caller was trying to find "Parent::dest", found "Importer::dest" via inheritance, and that function which was compiled under the name "Source::orig", rather than only being able to find out that last item.
</p>
<div class="pmsig"><div class="pmsig-22609"><p align="right">
- [tye]<tt> </tt>
</p></div></div>
603009
603135