_build/lib/My/Builder.pm

filter: Statementstmt 47.2% 17 / 36 Branchbran 0.0% 0 / 14 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 3 totaltotal 34.4% 20 / 58 SCAR 32.7
CC
8
Cov
34%
ACTION_latest_changes
72.0
ACTION_tarball_name
2.0
BEGIN
1.0
CRAP 26.4
↑ Summary blib/lib/TAP/Parser/SourceHandler/pgTAP.pm »
1 package My::Builder;
2 1 ▶use Module::Build;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 our @ISA = qw(Module::Build);
4  
5 sub ACTION_code {
6 1 ▶ use File::Spec::Functions;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶ my $self = shift;
Subroutine ACTION_code: called CC=1 SCAR=0.0
Pod undocumented
8 1 $self->SUPER::ACTION_code(@_);
9 # Copy the test scripts and then set the shebang line and make
10 # sure that they're executable.
11 1 my $to_dir = $self->localize_file_path("t/scripts");
12 1 my $from = $self->localize_file_path("t/bin/psql");
13 1 my $to = $self->localize_file_path("$to_dir/psql");
14 1 $self->copy_if_modified(
15 from => $from,
16 to_dir => $to_dir,
17 flatten => 1,
18 );
19 1 $self->fix_shebang_line($to);
20 1 $self->make_executable($to);
21 1 $self->add_to_cleanup($to_dir);
22 }
23 0 ▶ sub ACTION_tarball_name { print shift->dist_dir . ".tar.gz\n" }
Subroutine ACTION_tarball_name: not called CC=1 SCAR=6.9
Pod undocumented
24 sub ACTION_latest_changes {
25 0 ▶ my $self = shift;
Subroutine ACTION_latest_changes: not called CC=8 SCAR=42.8
Pod undocumented
26 0 (my $dv = $self->dist_version) =~ s/^v//;
27 0 ▶ open my $in, '<:raw', 'Changes' or die "Cannot open Changes: $!\n";
Branch: 1 branch
BranchTrueFalseTotal
open my $in, "<:raw", "Changes" or die "Cannot open Changes: $!\n" 0 0 0
28 0 ▶ open my $out, '>:raw', 'latest_changes.md' or die "Cannot open latest_changes.md: $!\n";
Branch: 1 branch
BranchTrueFalseTotal
open my $out, ">:raw", "latest_changes.md" or die "Cannot open latest_changes.md: $!\n" 0 0 0
29 0 ▶ while (<$in>) { last if /^\Q$dv\E\b/ }
Branch: 2 branches
BranchTrueFalseTotal
if (defined($_ = readline $in)) 0 0 0
if /^\Q$dv\E\b/ 0 0 0
30 0 print {$out} "Changes for v$dv\n";
31 0 ▶ while (<$in>) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined($_ = readline $in)) 0 0 0
32 0 ▶ last if /^\s*$/;
Branch: 1 branch
BranchTrueFalseTotal
if /^\s*$/ 0 0 0
33 0 chomp;
34 0 ▶ if (s/^\s+-/- /) {
Branch: 1 branch
BranchTrueFalseTotal
if (s/^\s+-/- /) { } 0 0 0
35 0 print {$out} "\n";
36 } else {
37 0 s/^\s+/ /;
38 }
39 0 print {$out} $_;
40 }
41 0 $self->add_to_cleanup('latest_changes.md');
42 }
43
44 1 1;
↑ Summary blib/lib/TAP/Parser/SourceHandler/pgTAP.pm »