Changeset 16807 for lang/perl/Devel-SearchINC/trunk
- Timestamp:
- 07/29/08 21:44:19 (5 years ago)
- Location:
- lang/perl/Devel-SearchINC/trunk
- Files:
-
- 1 removed
- 4 modified
-
MANIFEST (modified) (2 diffs)
-
lib/Devel/SearchINC (deleted)
-
lib/Devel/SearchINC.pm (modified) (4 diffs)
-
t/01_basic.t (modified) (2 diffs)
-
t/02_debug.t (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Devel-SearchINC/trunk/MANIFEST
r16474 r16807 14 14 inc/Test/More.pm 15 15 lib/Devel/SearchINC.pm 16 lib/Devel/SearchINC/FindLib.pm17 16 LICENSE 18 17 Makefile.PL … … 25 24 t/01_basic.t 26 25 t/02_debug.t 27 t/lib/A/B/B.pm28 26 t/lib/C/D/lib/C/D/F.pm 29 27 t/lib/C/D/lib/C/D/F/G.pm -
lang/perl/Devel-SearchINC/trunk/lib/Devel/SearchINC.pm
r16649 r16807 4 4 use strict; 5 5 use warnings; 6 use Data::Dumper; 6 7 use File::Find; 7 8 … … 14 15 return if keys %cache; 15 16 16 for my $path (our @paths) { 17 # Allow paths to be separated by semicolons as well as colons; 18 # splitting along colons is done by perl already. 19 20 find(sub { 21 if (-d && /^t|CVS|\.svn|skel|_build$/) { 22 $File::Find::prune = 1; 23 return; 24 } 25 26 return unless -f && /\.pm$/; 27 28 if ($File::Find::name =~ m!.*/(?:lib|blib/(?:lib|arch))/(.*)!) { 29 $cache{$1} ||= $File::Find::name; 30 31 } 32 }, @path); 33 } 34 35 if (our $DEBUG) { 36 use Data::Dumper; 37 print Dumper \%cache; 38 } 17 find(sub { 18 if (-d && /^t|CVS|\.svn|skel|_build$/) { 19 $File::Find::prune = 1; 20 return; 21 } 22 23 return unless -f && /\.pm$/; 24 25 if ($File::Find::name =~ m!.*/(?:lib|blib/(?:lib|arch))/(.*)!) { 26 $cache{$1} ||= $File::Find::name; 27 28 } 29 }, our @paths); 30 31 warn "cache:\n", Dumper \%cache if our $DEBUG; 39 32 } 40 33 … … 76 69 @_; 77 70 71 our @paths; 78 72 for my $path (@p) { 79 73 if ($path eq ':debug') { … … 81 75 next; 82 76 }; 83 push our@paths => $path;77 push @paths => $path; 84 78 } 85 79 } -
lang/perl/Devel-SearchINC/trunk/t/01_basic.t
r9771 r16807 1 use Test::More tests => 8;1 use Test::More tests => 6; 2 2 3 3 BEGIN { 4 4 use_ok('Devel::SearchINC', 't/lib'); 5 use_ok('A::B');6 5 use_ok('C::D::F'); 7 6 use_ok('C::D::F::G'); … … 14 13 } 15 14 16 is(A::B::answer(), 42, 'A::B::answer is 42');17 15 is(C::D::F::answer(), 42, 'C::D::F::answer is 42'); 18 16 is(C::D::F::G::answer(), 42, 'C::D::F::G::answer is 42'); -
lang/perl/Devel-SearchINC/trunk/t/02_debug.t
r9771 r16807 3 3 BEGIN { 4 4 use_ok('Devel::SearchINC', 't/lib', ':debug'); 5 use_ok(' A::B');5 use_ok('C::D::F'); 6 6 } 7 7 8 is( A::B::answer(), 42, 'A::B::answer is 42');8 is(C::D::F::answer(), 42, 'C::D::F::answer is 42');
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)