How can a package knows which path it is in? For example, I have a "test.pm" in "/www/somedir": package test; sub currDIR { use Cwd; print getcwd(); } and then a "main.cgi" in "/www": require "./somedir/test.pm"; test::currDIR(); running main.cgi will print me "/www" (path to main.cgi), however, I a +ctually want "/www/somedir" (path to test.pm) instead, which command +should I use? I'm asking this because I need to open certain files i +n the package, and those files are stored in the same directory as th +e package for portability issues. Thank you.
In reply to current path in a package? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |