Show
Ignore:
Timestamp:
07/29/08 21:44:19 (6 years ago)
Author:
hanekomu
Message:

Devel::SearchINC::FindLib? is no more; Devel::SearchINC should be sufficient

Location:
lang/perl/Devel-SearchINC/trunk
Files:
1 removed
4 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Devel-SearchINC/trunk/MANIFEST

    r16474 r16807  
    1414inc/Test/More.pm 
    1515lib/Devel/SearchINC.pm 
    16 lib/Devel/SearchINC/FindLib.pm 
    1716LICENSE 
    1817Makefile.PL 
     
    2524t/01_basic.t 
    2625t/02_debug.t 
    27 t/lib/A/B/B.pm 
    2826t/lib/C/D/lib/C/D/F.pm 
    2927t/lib/C/D/lib/C/D/F/G.pm 
  • lang/perl/Devel-SearchINC/trunk/lib/Devel/SearchINC.pm

    r16649 r16807  
    44use strict; 
    55use warnings; 
     6use Data::Dumper; 
    67use File::Find; 
    78 
     
    1415    return if keys %cache; 
    1516 
    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; 
    3932} 
    4033 
     
    7669        @_; 
    7770 
     71    our @paths; 
    7872    for my $path (@p) { 
    7973        if ($path eq ':debug') { 
     
    8175            next; 
    8276        }; 
    83         push our @paths => $path; 
     77        push @paths => $path; 
    8478    } 
    8579} 
  • lang/perl/Devel-SearchINC/trunk/t/01_basic.t

    r9771 r16807  
    1 use Test::More tests => 8; 
     1use Test::More tests => 6; 
    22 
    33BEGIN { 
    44    use_ok('Devel::SearchINC', 't/lib'); 
    5     use_ok('A::B'); 
    65    use_ok('C::D::F'); 
    76    use_ok('C::D::F::G'); 
     
    1413} 
    1514 
    16 is(A::B::answer(), 42, 'A::B::answer is 42'); 
    1715is(C::D::F::answer(), 42, 'C::D::F::answer is 42'); 
    1816is(C::D::F::G::answer(), 42, 'C::D::F::G::answer is 42'); 
  • lang/perl/Devel-SearchINC/trunk/t/02_debug.t

    r9771 r16807  
    33BEGIN { 
    44    use_ok('Devel::SearchINC', 't/lib', ':debug'); 
    5     use_ok('A::B'); 
     5    use_ok('C::D::F'); 
    66} 
    77 
    8 is(A::B::answer(), 42, 'A::B::answer is 42'); 
     8is(C::D::F::answer(), 42, 'C::D::F::answer is 42');