Devel-CoverReport
view release on metacpan or search on metacpan
lib/Devel/CoverReport.pm view on Meta::CPAN
# Detect what VCS handles the file...
my ( $basedir ) = ( $filename =~ m{^(.*?)/[^/]+$}s );
my $vcs;
# Probe for Subversion
if (-d $basedir .q{/.svn}) {
$vcs = 'SVN';
}
# Probe for Git
my @dir_parts = split m{/}, $basedir;
while (1) {
my $tmp_path = join q{/}, @dir_parts, q{.git};
if (-d $tmp_path) {
$vcs = 'Git';
last;
}
if (not scalar @dir_parts) {
last;
lib/Devel/CoverReport/App/CoverReport.pm view on Meta::CPAN
},
);
foreach my $option (qw( report criterion )) {
# If not specified, we assume: gimme all You got ;)
if (not scalar @{ $raw_options{$option} } ) {
$raw_options{$option} = [ 'all' ];
}
my @strings;
foreach my $string (@{ $raw_options{$option} }) {
push @strings, ( split m{\,[\s]*}s, $string );
}
foreach my $string (@strings) {
if ($string eq 'all') {
foreach my $_string (keys %{ $allowed_selections{$option} }) {
$run_options{$option}->{ $_string } = 2;
}
# There is no much sense in checking other strings...
last;
( run in 2.217 seconds using v1.01-cache-2.11-cpan-71847e10f99 )