File Coverage

blib/lib/Module/Install/InstallDirs.pm
Criterion Covered Total %
statement 17 17 100.0
branch 2 2 100.0
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 23 24 95.8


line stmt bran cond sub pod time code
1             # Copyright (c) 2003 Graham Barr . All rights reserved.
2             # This program is free software; you can redistribute it and/or
3             # modify it under the same terms as Perl itself.
4              
5             package Module::Install::InstallDirs;
6 1     1   27013 use Module::Install::Base; @ISA = qw(Module::Install::Base);
  1         3  
  1         40  
7 1     1   7 use Config;
  1         2  
  1         50  
8              
9             $VERSION = '0.02';
10 1     1   5 use strict;
  1         2  
  1         180  
11              
12             sub installdirs {
13 2     2 0 1010 my $self = shift;
14 2         1121 my @dirs = ($Config{privlib},$Config{archlib});
15 2         5275 foreach my $module (@_) {
16 2         8 (my $path = "$module.pm") =~ s,::,/,g;
17 2         9 foreach my $dir (@dirs) {
18 3 100       121 if (-f "$dir/$path") {
19 1         7 $self->makemaker_args(INSTALLDIRS => 'perl');
20 1         5 return;
21             }
22             }
23             }
24             }
25              
26             1;
27              
28             __END__