Skip Menu |

This queue is for tickets about the Image-Maps-Plot-FromLatLong CPAN distribution.

Report information
The Basics
Id: 3784
Status: resolved
Worked: 5 min
Priority: 0/
Queue: Image-Maps-Plot-FromLatLong

People
Owner: Nobody in particular
Requestors: MARKSTOS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.1
Fixed in: (no value)



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
Show quoted text
> my $MOD = __PACKAGE__; > $MOD =~ s/::/\//g; > $MOD = $INC{$MOD};
I didn't think of that! Thanks. Lee
I hope it will work now. The problem is one I have to properly research, though: how can a module find its own install path? And, how/where can I put support files, such as JPEGs? I've got it working sometimes, on some platforms, but is there a nice way to do it? Lee