Zucchini/Types.pm

filter: Statementstmt 81.8% 18 / 22 Branchbran 33.3% 2 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 55.5% 5 / 9 Podpod n/a totaltotal 67.5% 25 / 37 CC 4 SCAR 9.0
CC
4
Cov
71%
__ANON__
6.0
__ANON__
2.1
__ANON__
2.1
CRAP 2.5
« Zucchini/Config.pm ↑ Summary Zucchini/Config/Create.pm »
1 package Zucchini::Types;
2 8 $Zucchini::Types::VERSION = '0.0.21';
3 {
4 8 $Zucchini::Types::DIST = 'Zucchini';
5 }
6 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 # ABSTRACT: Moo type definitions
8 8 ▶use MooX::Types::MooseLike::Base;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 8 ▶use base qw(Exporter);
Subroutine BEGIN: called CC=1 SCAR=0.0
10 8 our @EXPORT_OK = ();
11 my $defs = [
12 {
13 name => 'ZucchiniConfig',
14 9 ▶ test => sub { ref($_[0]) && 'Zucchini::Config' eq ref($_[0]) },
Subroutine __ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] and "Zucchini::Config" eq ref $_[0] 9 0 9
15 0 ▶ message => sub { "$_[0] is not the type we want!" }
Subroutine __ANON__: not called CC=1 SCAR=6.9
16 },
17 {
18 name => 'NetFTP',
19 0 ▶ test => sub { ref($_[0]) && 'Net::FTP' eq ref($_[0]) },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] and "Net::FTP" eq ref $_[0] 0 0 0
20 0 ▶ message => sub { "$_[0] is not the type we want!" }
Subroutine __ANON__: not called CC=1 SCAR=6.9
21 },
22 {
23 name => 'TemplateToolkit',
24 5 ▶ test => sub { ref($_[0]) && 'Template' eq ref($_[0]) },
Subroutine __ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] and "Template" eq ref $_[0] 5 0 5
25 0 ▶ message => sub { "$_[0] is not the type we want!" }
Subroutine __ANON__: not called CC=1 SCAR=6.9
26 },
27 8 ];
28 8 MooX::Types::MooseLike::register_types($defs, __PACKAGE__);
29 # optionally add an 'all' tag so one can:
30 # use MyApp::Types qw/:all/; # to import all types
31 8 our %EXPORT_TAGS = ('all' => \@EXPORT_OK);
32  
33 __END__
« Zucchini/Config.pm ↑ Summary Zucchini/Config/Create.pm »