b/ModuleBuildZoid.pm

filter: Statementstmt 54.1% 13 / 24 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 4 totaltotal 48.5% 17 / 35 CC 3 SCAR 6.3
CC
3
Cov
54%
process_MyPost_files
2.1
MyInit
2.0
process_MyPre_files
2.0
CRAP 1.9
« blib/lib/auto/share/dist/Zoidberg/plugins/CPAN.pm ↑ Summary t/zoidrc »
1 package # hide from pause indexer
2 ModuleBuildZoid;
3  
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 require Module::Build;
7 2 require File::Spec;
8  
9 2 our @ISA = qw/Module::Build/;
10  
11 0 ▶sub MyInit {
Subroutine MyInit: not called CC=1 SCAR=6.9
Pod undocumented
12 0 my $self = shift;
13  
14 # setup man1 docs to be used
15 0 push @{$$self{properties}{bindoc_dirs}}, 'man1';
16  
17 # setup handlers to be called
18 0 unshift @{$$self{properties}{build_elements}}, 'MyPre';
19 0 push @{$$self{properties}{build_elements}}, 'MyPost';
20  
21 }
22  
23  
24 1 ▶sub process_MyPre_files {
Subroutine process_MyPre_files: called CC=2 SCAR=6.9
Pod undocumented
25 1 my $self = shift;
26  
27 1 my $blib = $self->blib;
28 1 my $testPL = File::Spec->catfile('b','test.PL');
29  
30 1 $self->run_perl_script($testPL);
31  
32 $self->copy_if_modified( from => $_, to => File::Spec->catfile($blib, 'doc', $_) )
33 1 for qw/Changes README/;
34  
35 }
36  
37 1 ▶sub process_MyPost_files {
Subroutine process_MyPost_files: called CC=2 SCAR=7.2
Pod undocumented
38 1 my $self = shift;
39 $self->run_perl_script( File::Spec->catfile('b', 'Strip.PL') )
40 1 ▶ if $self->{args}{strip};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"args"}{"strip"} 0 1 1
41 }
42  
43 # overloaded methods
44  
45 0 ▶sub man1page_name { # added the s/\.pod$//
Subroutine man1page_name: not called CC=1 SCAR=6.9
Pod undocumented
46 0 my $self = shift;
47 0 my $name = File::Basename::basename( shift );
48 0 $name =~ s/\.pod$//;
49 0 return $name;
50 }
51  
52 =head1 NAME
53  
54 ModuleBuildZoid - a custom subclass of Module::Build
55  
56 =head1 DESCRIPTION
57  
58 Class with some custom stuff to overloaded L<Module::Build>
59 for building Zoidberg.
60  
61 =cut
« blib/lib/auto/share/dist/Zoidberg/plugins/CPAN.pm ↑ Summary t/zoidrc »