in reply to Re: Module Self-Location
in thread Module Self-Location

Thanks, japhy! I spent a lot of time searching all over the place because I thought I had seen an easy way to do this. But I had forgotten that %INC was setting there holding just exactly the information I was looking for. :-)

Update: Here's my updated self-locating module:
package MyModule; use strict; my $inc_dir = $INC{'MyModule.pm'}; $inc_dir =~ s!/MyModule.pm$!!; print "MyModule found at: $inc_dir\n"; 1;
Update 2: After a little more searching, I finally found the original node I was looking for: Read a static file from module directory.

Impossible Robot