blib/lib/Syntax/Keyword/Assert.pm

filter: Statementstmt 96.5% 28 / 29 Branchbran 50.0% 3 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 10 / 10 Podpod 0.0% 0 / 3 totaltotal 85.4% 41 / 48 CC 4 SCAR 7.1
CC
4
Cov
89%
apply
4.4
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
↑ Summary builder/MyBuilder.pm »
1 package Syntax::Keyword::Assert 0.20;
2  
3 11 ▶use v5.14;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 11 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 11 ▶use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 11 require XSLoader;
9 11 XSLoader::load( __PACKAGE__, our $VERSION );
10  
11 10 ▶sub import {
Subroutine import: called CC=1 SCAR=0.0
12 10 my $pkg = shift;
13 10 my $caller = caller;
14  
15 10 $pkg->import_into( $caller, @_ );
16 }
17  
18 1 ▶sub unimport {
Subroutine unimport: called CC=1 SCAR=0.0
19 1 my $pkg = shift;
20 1 my $caller = caller;
21  
22 1 $pkg->unimport_into( $caller, @_ );
23 }
24  
25 10 ▶sub import_into { shift->apply( sub { $^H{ $_[0] }++ }, @_ ) }
Subroutine __ANON__: called CC=1 SCAR=0.0
Subroutine import_into: called CC=1 SCAR=0.0
Pod undocumented
26 1 ▶sub unimport_into { shift->apply( sub { delete $^H{ $_[0] } }, @_ ) }
Subroutine __ANON__: called CC=1 SCAR=0.0
Subroutine unimport_into: called CC=1 SCAR=0.0
Pod undocumented
27  
28 11 ▶sub apply {
Subroutine apply: called CC=4 SCAR=14.8
Pod undocumented
29 11 my $pkg = shift;
30 11 my ( $cb, $caller, @syms ) = @_;
31  
32 11 ▶ @syms or @syms = qw( assert );
Branch: 1 branch
BranchTrueFalseTotal
@syms or @syms = "assert" 0 11 11
33  
34 11 my %syms = map { $_ => 1 } @syms;
35 11 ▶ $cb->( "Syntax::Keyword::Assert/assert" ) if delete $syms{assert};
Branch: 1 branch
BranchTrueFalseTotal
if delete $syms{"assert"} 11 0 11
36  
37 0 ▶ Carp::croak "Unrecognised import symbols @{[ keys %syms ]}" if keys %syms;
Branch: 1 branch
BranchTrueFalseTotal
if keys %syms 0 11 11
38 }
39  
40 11 1;
41 __END__
↑ Summary builder/MyBuilder.pm »