blib/lib/Puncheur/Plugin/ShareDir.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 5 | 9 | 55.5 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
26 | 1 | 0 | 0 | $d2 and -d $d2 |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
14 | 1 | 1 | 0 | ref $c || $c |
29 | 1 | 1 | 0 | $$SHARE_DIR_CACHE{$klass} ||= sub { my $d1 = 'File::Spec'->catfile($c->base_dir, 'share'); return $d1 if -d $d1; my $dist = first(sub { $_->isa('Puncheur') if $_ ne 'Puncheur'; } , reverse(@{&mro::get_linear_isa($klass);})); $dist =~ s/::/-/g; local $@; my $d2 = eval { do { File::ShareDir::dist_dir($dist) } }; return $d2 if $d2 and -d $d2; return $d1; } ->() |