I think you want $INC{__PACKAGE__.".pm"};
Also note that the lexical variable my $pathname would go out of scope at the end of the BEGIN block.
In reply to Re: a few questions about __PACKAGE__
by Eliya
in thread a few questions about __PACKAGE__
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |