Subject: | $MOD will be wrong in some cases |
I believe the value of "$MOD" will be wrong when the module is installed in a non-standard location. Here's the code I'm referring to:
my $MOD = "$Config{installsitelib}/".__PACKAGE__;
$MOD =~ s/::/\//g;
$MOD =~ s/[^\/]+$//;
####
Instead, try looking in %INC:
my $MOD = __PACKAGE__;
# transform colons to slashs to confirm with %INC format
$MOD =~ s/::/\//g;
# Get path from from %INC
$MOD = $INC{$MOD};
# Shop off last slash to get path
$MOD =~ s/[^\/]+$//;
########
... I haven't tested that.
Mark