Devel-Cover
view release on metacpan or search on metacpan
.perlcriticrc view on Meta::CPAN
# allow_if_string_contains_single_quote = 0
# Write `oct(755)' instead of `0755'.
[-ValuesAndExpressions::ProhibitLeadingZeros]
# set_themes = bugs certrec core pbp
# add_themes =
# severity = 5
# maximum_violations_per_document = no_limit
# Don't allow any leading zeros at all. Otherwise builtins that deal with Unix permissions, e.g. chmod, don't get flagged.
# strict = 0
# Long chains of method calls indicate tightly coupled code.
[ValuesAndExpressions::ProhibitLongChainsOfMethodCalls]
# set_themes = core maintenance
# add_themes =
# severity = 2
# maximum_violations_per_document = no_limit
0.67 - 8th May 2010
- Fix up the Makefile for dmake on Strawberry Perl (Curtis Jewell) (RT-50774)
0.66 - 12th April 2010
- Move to faster method of collecting data. Could be up to twice as fast now
- Add -replace_ops options to be able to revert to previous collection method
- Test against 5.12.0 and update tests as necessary
- Work better with nonexistent databases
- XS fixes related to overriding ops rather than replacing runops
(Florian Ragwitz)
- Don't chmod created directories (mkdir should suffice)
0.65 - 8th August 2009
- Fix uninitialised value warning (reported by Andrew Billeb)
- Test against 5.8.9 and 5.10.1 (RC1)
- Correct deparsed conditional output in elsif conditions
- Unset PERL5OPT when running tests
0.64 - 10th April 2008
- Build on Windows
- Make "cover -test" work for Module::Build (Michael G Schwern) (RT-34263)
lib/Devel/Cover.pm view on Meta::CPAN
$Dir = $1 if $Dir =~ /(.*)/; # Die tainting
} else {
$Dir = $1 if Cwd::getcwd() =~ /(.*)/;
}
$DB = File::Spec->rel2abs($DB, $Dir);
unless (mkdir $DB) {
my $err = $!;
die "Can't mkdir $DB as EUID $>: $err" unless -d $DB;
}
chmod 0777, $DB if $Loose_perms;
$DB = $1 if abs_path($DB) =~ /(.*)/; ## no critic (CaptureWithoutTest)
Devel::Cover::DB->delete($DB) unless $Merge;
%Files = (); # start gathering file information from scratch
for my $c (Devel::Cover::DB->new->criteria) {
my $func = "coverage_$c";
no strict "refs";
$Criteria{$c} = $func->();
}
lib/Devel/Cover.pm view on Meta::CPAN
base => $DB,
runs => { $run => \%Run },
structure => $Structure,
loose_perms => $Loose_perms
);
my $dbrun = "$DB/runs";
unless (mkdir $dbrun) {
die "Can't mkdir $dbrun $!" unless -d $dbrun;
}
chmod 0777, $dbrun if $Loose_perms;
$dbrun .= "/$run";
print OUT __PACKAGE__, ": Writing coverage database to $dbrun\n"
unless $Silent;
$cover->write($dbrun);
$Digests->write;
$cover->print_summary if $Summary && !$Silent;
if ($Self_cover && !$Self_cover_run) {
$cover->delete;
lib/Devel/Cover/DB.pm view on Meta::CPAN
}
sub write {
my $self = shift;
$self->{db} = shift if @_;
croak "No db specified" unless length $self->{db};
unless (mkdir $self->{db}) {
croak "Can't mkdir $self->{db}: $!\n" unless -d $self->{db};
}
chmod 0777, $self->{db} if $self->{loose_perms};
$self->validate_db;
my $db = { runs => $self->{runs} };
my $io = Devel::Cover::DB::IO->new;
$io->write($db, "$self->{db}/$DB");
$self->{structure}->write($self->{base}) if $self->{structure};
$self
}
sub delete {
lib/Devel/Cover/DB/Structure.pm view on Meta::CPAN
# TODO - concurrent runs updating structure?
sub write {
my $self = shift;
my ($dir) = @_;
# print STDERR Dumper $self;
$dir .= "/structure";
unless (mkdir $dir) {
confess "Can't mkdir $dir: $!" unless -d $dir;
}
chmod 0777, $dir if $self->{loose_perms};
for my $file (sort keys %{ $self->{f} }) {
$self->{f}{$file}{file} = $file;
my $digest = $self->{f}{$file}{digest};
$digest = $1 if defined $digest && $digest =~ /(.*)/; # ie tainting
unless ($digest) {
print STDERR "Can't find digest for $file"
unless $Devel::Cover::Silent
|| $file =~ $Devel::Cover::DB::Ignore_filenames
|| ($Devel::Cover::Self_cover && $file =~ q|/Devel/Cover[./]|);
next;
dc $v cpancover-build-module "$module")
((verbose)) && pi "container is $container"
$docker wait "$name" # >/dev/null
# shellcheck disable=SC2181
if [[ $? == 0 ]]; then
$docker logs "$name"
local_staging="$staging/$name"
mkdir -p "$local_staging"
$docker cp "$name:/root/cover/staging" "$local_staging"
if [[ -d $local_staging ]]; then
chmod -R 755 "$local_staging"
find "$local_staging" -type f -exec chmod 644 {} \;
chown -R "$(id -un):$(id -gn)" "$local_staging"
cd "$local_staging"/* || exit
for f in *; do
if [[ -d $f ]]; then
rm -rf "${staging:?}/$f"
mv "$f" "$staging"
fi
done
rm -r "$local_staging"
fi
( run in 0.475 second using v1.01-cache-2.11-cpan-8d75d55dd25 )