use Proc::Pathname; my $path = Proc::Pathname::get() or die "failed to get pathname";
A common way to retrieve a path for the program is using the variable $0. However, sometimes it is not working for you. So, you have to find a way to retrieve the path for the program somehow differently.
The module is using system calls to do the job and written as XS module. This module was made for private purposes, mostly, for staticperl.
Ok, this was an introduction part and copy-pasted from the module documentation. Speeking freely, I have made this module because of when using staticperl I was unable to retrieve a correct value of $0 sometimes. And I suppose the module have a limited amount of purposes. I am not sure if it should be uploaded to CPAN, so let's it be here. But, who knows, may be it will be useful for you.
The name of the module was choosen as a combination of well-known system calls on Unix-like systems, more specifically, from Solaris: getexecname(). And, yep, I am not sure if the name is good.
So, if you have something to say, I will be glad to see your comments, suggestions and so on.