I also know that the path is available in @INC (via use lib...). But I don't know how to get the correct one from here.
Using DBI.pm as an example of a file to find:
#!/usr/bin/env perl use strict; use warnings; my ($path) = grep { -f "$_/DBI.pm" } @INC; print $path;
Not absolutely the most efficient, but it will work.
In reply to Re: Path relative to package
by hippo
in thread Path relative to package
by DreamT
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |