MooX/Press/Keywords.pm

filter: Statementstmt 91.4% 32 / 35 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 88.8% 8 / 9 Podpod 0.0% 0 / 1 totaltotal 85.7% 42 / 49 CC 3 SCAR 7.4
CC
3
Cov
87%
confess
6.0
import
2.0
BEGIN
1.0
CRAP 2.1
« Zydeco/Lite.pm ↑ Summary
1 3 ▶use 5.008008;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package MooX::Press::Keywords;
6  
7 3 our $AUTHORITY = 'cpan:TOBYINK';
8 3 our $VERSION = '0.086';
9  
10 3 ▶use Type::Library -base;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 3 ▶use Type::Utils ();
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 3 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
14 3 Type::Utils::extends(qw/
15 Types::Standard
16 Types::Common::Numeric
17 Types::Common::String
18 /);
19 };
20  
21 3 our (%EXPORT_TAGS, @EXPORT_OK);
22  
23 sub true () { !!1 }
24 sub false () { !!0 }
25  
26 3 $EXPORT_TAGS{ 'booleans' } = [qw/ true false /];
27  
28 sub ro () { 'ro' }
29 sub rw () { 'rw' }
30 sub rwp () { 'rwp' }
31 sub lazy () { 'lazy' }
32 sub bare () { 'bare' }
33 sub private () { 'private' }
34  
35 3 $EXPORT_TAGS{ 'privacy' } = [qw/ ro rw rwp lazy bare private /];
36  
37 3 ▶use Scalar::Util qw( blessed );
Subroutine BEGIN: called CC=1 SCAR=0.0
38 0 ▶sub confess {
Subroutine confess: not called CC=2 SCAR=17.9
Pod undocumented
39 0 ▶ @_ = sprintf(shift, @_) if @_ > 1;
Branch: 1 branch
BranchTrueFalseTotal
if @_ > 1 0 0 0
40 0 require Carp;
41 0 goto \&Carp::confess;
42 }
43  
44 3 $EXPORT_TAGS{ 'util' } = [qw/ blessed confess /];
45  
46 3 push @EXPORT_OK, map @{$EXPORT_TAGS{$_}}, keys(%EXPORT_TAGS);
47  
48 3 my $orig = 'Type::Library'->can('import');
49 3 ▶sub import {
Subroutine import: called CC=2 SCAR=6.9
50 3 'strict'->import;
51 3 'warnings'->import;
52 3 ▶ push @_, -all if @_ == 1;
Branch: 1 branch
BranchTrueFalseTotal
if @_ == 1 2 1 3
53 3 goto $orig;
54 }
55  
56 3 1;
57  
58 __END__
« Zydeco/Lite.pm ↑ Summary