kentnl / File-ShareDir-ProjectDistDir

Simple set-and-forget using of a '/share' directory in your projects root
Other
5 stars 5 forks source link

My /usr/local/ is misdetected as a development directory #7

Closed mauke closed 11 years ago

mauke commented 11 years ago

See also https://github.com/xenoterracide/Pod-Spell/issues/8.

Apparently File::ShareDir::ProjectDistDir does the following to decide whether we're in a development environment:

I'm confused how this could ever have worked because it gives false positives for e.g. /usr/lib (/usr/share) or /usr/local/lib (/usr/local/share) or (in my case) ~/usr/local/lib (~/usr/local/share).

xenoterracide commented 11 years ago

It think it normally works because /usr/lib doesn't normally contain the perl modules, they're buried away from /usr/local/share in a subdirectory of perl, but your actual case is a bit different and I don't know the solution.

mauke commented 11 years ago

I have perl modules under e.g. /usr/lib/perl5/site_perl/5.12.4/ so I don't see why a directory climb shouldn't end up at /usr/lib.

kentfredric commented 11 years ago

Could you try see what happens with https://metacpan.org/release/KENTNL/File-ShareDir-ProjectDistDir-0.5.0-TRIAL ?

It uses a different marker for finding $PROJECTROOT, namely Path::FindDev which uses Path::IsDev instead of assuming things about path components.

mauke commented 11 years ago

That seems to work. After installing 0.5.0-TRIAL I can use Pod::Spell without errors.

kentfredric commented 11 years ago

I've just released a non-trial version, 0.5.1, hopefully that is satisfactory remedy to close this bug =).

If not, feel free to re-open / open new bugs as applicable.

Thanks. :smiley: