The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Changes 024
LICENSE 11
MANIFEST 13
META.yml 1717
Makefile.PL 67
README 22
TODO.md 03
cpanfile 019
dist.ini 310
lib/Module/Path.pm 612
10 files changed (This is a version diff) 3698
@@ -1,5 +1,29 @@
 Revision history for Perl module Module::Path
 
+0.18 2014-12-17
+    - RIBASUSHI++ reminded me that to be a usable directory in @INC we need
+      to check -d && -r && -x.
+
+0.17 2014-12-17
+    - Fixed RT#96433: ignore directories in @INC which don't exist.
+      Apologies to ETHER++ for over-thinking this one,
+      and taking so long to fix it.
+
+0.16 2014-12-13
+    - Added TODO.md with an initial todo list for the module
+
+0.15 2014-10-14
+    - Doing a foreach $dir (@INC) and then resolving symblinks on $dir
+      was changing the entries in @INC. HAARG++ for pull request with fix.
+    - Changed author email address to be my CPAN email address.
+
+0.14 2014-08-16
+    - Added Travis config, using cpanfile and cpanm to ensure all dependencies
+      are installed before running tests with prove.
+      Thanks to DAGOLDEN.
+    - Improved the first paragraph of DESCRIPTION, so search results give
+      a better summary of the module.
+
 0.13 2014-02-22
     - Looks like in some rare circumstances, Cwd::abs_path() can croak,
       so now we wrap that in eval { } and deal accordingly.
@@ -22,7 +22,7 @@ This is free software, licensed under:
                      Version 1, February 1989
 
  Copyright (C) 1989 Free Software Foundation, Inc.
- 51 Franklin St, Suite 500, Boston, MA  02110-1335  USA
+ 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
@@ -1,11 +1,13 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.013.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.025.
 Changes
 LICENSE
 MANIFEST
 META.yml
 Makefile.PL
 README
+TODO.md
 bin/mpath
+cpanfile
 dist.ini
 lib/Module/Path.pm
 t/01-require.t
@@ -1,31 +1,31 @@
 ---
 abstract: 'get the full path to a locally installed module'
 author:
-  - 'Neil Bowers <neil@bowers.com>'
+  - 'Neil Bowers <neilb@cpan.org>'
 build_requires:
-  Devel::FindPerl: 0
-  File::Spec::Functions: 0
-  FindBin: 0.05
-  Test::More: 0.88
+  Devel::FindPerl: '0'
+  File::Spec::Functions: '0'
+  FindBin: '0.05'
+  Test::More: '0.88'
 configure_requires:
-  ExtUtils::MakeMaker: 6.30
+  ExtUtils::MakeMaker: '0'
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 5.013, CPAN::Meta::Converter version 2.133380'
+generated_by: 'Dist::Zilla version 5.025, CPAN::Meta::Converter version 2.143240'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
-  version: 1.4
+  version: '1.4'
 name: Module-Path
 requires:
-  Cwd: 0
-  Exporter: 0
-  File::Basename: 0
-  Getopt::Long: 0
-  Pod::Usage: 0
-  perl: 5.006
-  strict: 0
-  warnings: 0
+  Cwd: '0'
+  Exporter: '0'
+  File::Basename: '0'
+  Getopt::Long: '0'
+  Pod::Usage: '0'
+  perl: '5.006'
+  strict: '0'
+  warnings: '0'
 resources:
   homepage: https://github.com/neilbowers/Module-Path
   repository: https://github.com/neilbowers/Module-Path.git
-version: 0.13
+version: '0.18'
@@ -1,26 +1,26 @@
 
-# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.013.
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.025.
 use strict;
 use warnings;
 
 use 5.006;
 
-use ExtUtils::MakeMaker 6.30;
+use ExtUtils::MakeMaker;
 
 
 
 my %WriteMakefileArgs = (
   "ABSTRACT" => "get the full path to a locally installed module",
-  "AUTHOR" => "Neil Bowers <neil\@bowers.com>",
-  "BUILD_REQUIRES" => {},
+  "AUTHOR" => "Neil Bowers <neilb\@cpan.org>",
   "CONFIGURE_REQUIRES" => {
-    "ExtUtils::MakeMaker" => "6.30"
+    "ExtUtils::MakeMaker" => 0
   },
   "DISTNAME" => "Module-Path",
   "EXE_FILES" => [
     "bin/mpath"
   ],
   "LICENSE" => "perl",
+  "MIN_PERL_VERSION" => "5.006",
   "NAME" => "Module::Path",
   "PREREQ_PM" => {
     "Cwd" => 0,
@@ -37,7 +37,7 @@ my %WriteMakefileArgs = (
     "FindBin" => "0.05",
     "Test::More" => "0.88"
   },
-  "VERSION" => "0.13",
+  "VERSION" => "0.18",
   "test" => {
     "TESTS" => "t/*.t"
   }
@@ -48,6 +48,7 @@ my %FallbackPrereqs = (
   "Cwd" => 0,
   "Devel::FindPerl" => 0,
   "Exporter" => 0,
+  "ExtUtils::MakeMaker" => 0,
   "File::Basename" => 0,
   "File::Spec::Functions" => 0,
   "FindBin" => "0.05",
@@ -1,7 +1,7 @@
 
 
 This archive contains the distribution Module-Path,
-version 0.13:
+version 0.18:
 
   get the full path to a locally installed module
 
@@ -11,5 +11,5 @@ This is free software; you can redistribute it and/or modify it under
 the same terms as the Perl 5 programming language system itself.
 
 
-This README file was generated by Dist::Zilla::Plugin::Readme v5.013.
+This README file was generated by Dist::Zilla::Plugin::Readme v5.025.
 
@@ -0,0 +1,3 @@
+* Add tests for different permutations of -x, -d, -r on directories in @INC
+* Add tests for all the different permutations with symlinks
+* Full test coverage with Devel::Cover
@@ -0,0 +1,19 @@
+requires "Cwd" => "0";
+requires "Exporter" => "0";
+requires "File::Basename" => "0";
+requires "Getopt::Long" => "0";
+requires "Pod::Usage" => "0";
+requires "perl" => "5.006";
+requires "strict" => "0";
+requires "warnings" => "0";
+
+on 'test' => sub {
+  requires "Devel::FindPerl" => "0";
+  requires "File::Spec::Functions" => "0";
+  requires "FindBin" => "0.05";
+  requires "Test::More" => "0.88";
+};
+
+on 'configure' => sub {
+  requires "ExtUtils::MakeMaker" => "0";
+};
@@ -1,12 +1,19 @@
 name    = Module-Path
-author  = Neil Bowers <neil@bowers.com>
+author  = Neil Bowers <neilb@cpan.org>
 license = Perl_5
 copyright_holder = Neil Bowers
 copyright_year   = 2013
 
-version = 0.13
+version = 0.18
 
-[@Basic]
+[@Filter]
+-bundle = @Basic
+-remove = GatherDir
+[GatherDir]
+exclude_filename = cpanfile
+[CPANFile]
+[CopyFilesFromBuild]
+copy = cpanfile
 [PkgVersion]
 [AutoPrereqs]
 [ExtraTests]
@@ -1,6 +1,6 @@
 package Module::Path;
 # ABSTRACT: get the full path to a locally installed module
-$Module::Path::VERSION = '0.13';
+$Module::Path::VERSION = '0.18';
 use 5.006;
 use strict;
 use warnings;
@@ -41,15 +41,18 @@ sub module_path
         # a reference in @INC
         next DIRECTORY if ref($dir);
 
+        next unless -d $dir && -r $dir && -x $dir;
+
         # The directory path might have a symlink somewhere in it,
         # so we get an absolute path (ie resolve any symlinks).
         # The previous attempt at this only dealt with the case
         # where the final directory in the path was a symlink,
         # now we're trying to deal with symlinks anywhere in the path.
-        eval { $dir = abs_path($dir); };
-        next DIRECTORY if $@ || !defined($dir);
+        my $abs_dir = $dir;
+        eval { $abs_dir = abs_path($abs_dir); };
+        next DIRECTORY if $@ || !defined($abs_dir);
 
-        $fullpath = $dir.$SEPARATOR.$relpath;
+        $fullpath = $abs_dir.$SEPARATOR.$relpath;
         return $fullpath if -f $fullpath;
     }
 
@@ -75,8 +78,11 @@ Module::Path - get the full path to a locally installed module
 
 =head1 DESCRIPTION
 
-Module::Path provides a single function, C<module_path()>,
-which will find where a module is installed locally.
+This module provides a single function, C<module_path()>,
+which takes a module name and finds the first directory in your C<@INC> path
+where the module is installed locally.
+It returns the full path to that file, resolving any symlinks.
+It is portable and only depends on core modules.
 
 It works by looking in all the directories in C<@INC>
 for an appropriately named file: