PerlGenerator/Template.pm

filter: Statementstmt 100% 21 / 21 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 11 / 11 Podpod 55.5% 5 / 9 totaltotal 90.7% 39 / 43 CC 2 SCAR 1.5
CC
2
Cov
100%
elsif_chain
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« PerlGenerator.pm ↑ Summary PerlGenerator/Template/Mojo.pm »
1 package OpenAPI::PerlGenerator::Template 0.02;
2 3 ▶use 5.020;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use experimental 'signatures';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 3 our $info;
6  
7 =head1 NAME
8  
9 OpenAPI::PerlGenerator::Template - Reflection package for template methods
10  
11 =head1 DESCRIPTION
12  
13 This package reflects functions called as subroutines onto a global
14 variable C<$info> for convenient calling from within (Mojolicious) templates.
15  
16 =head1 REFLECTED METHODS
17  
18 =head2 C<< markdown_to_pod >>
19  
20 =cut
21  
22 2077 ▶sub markdown_to_pod {
Subroutine markdown_to_pod: called CC=1 SCAR=0.0
Pod documented
23 2077 $info->markdown_to_pod( @_ );
24 }
25  
26 =head2 C<< map_type >>
27  
28 =cut
29  
30 2320 ▶sub map_type {
Subroutine map_type: called CC=1 SCAR=0.0
Pod documented
31 2320 $info->map_type( @_ );
32 }
33  
34 =head2 C<< property_name >>
35  
36 =cut
37  
38 5277 ▶sub property_name {
Subroutine property_name: called CC=1 SCAR=0.0
Pod documented
39 5277 $info->property_name( @_ );
40 }
41  
42 =head2 C<< single_line >>
43  
44 =cut
45  
46 1944 ▶sub single_line {
Subroutine single_line: called CC=1 SCAR=0.0
Pod documented
47 1944 $info->single_line( @_ );
48 }
49  
50  
51 =head2 C<< openapi_submodules >>
52  
53 =cut
54  
55 6 ▶sub openapi_submodules {
Subroutine openapi_submodules: called CC=1 SCAR=0.0
Pod documented
56 6 $info->openapi_submodules( @_ );
57 }
58  
59 509 ▶sub openapi_response_content_types {
Subroutine openapi_response_content_types: called CC=1 SCAR=0.0
Pod undocumented
60 509 $info->openapi_response_content_types( @_ );
61 }
62  
63 1944 ▶sub openapi_http_code_match {
Subroutine openapi_http_code_match: called CC=1 SCAR=0.0
Pod undocumented
64 1944 $info->openapi_http_code_match( @_ );
65 }
66  
67 3925 ▶sub render( $name, $args ) {
Subroutine render: called CC=1 SCAR=0.0
Pod undocumented
68 3925 $info->render( $name, $args );
69 }
70 3 *include = *include = \&render;
71  
72 3 our %locations;
73 1944 ▶sub elsif_chain($id) {
Subroutine elsif_chain: called CC=2 SCAR=6.9
Pod undocumented
74 # Ignore all Mojo:: stuff!
75 1944 my $level = 0;
76 1944 ▶ if( !$locations{ $id }++) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $OpenAPI::PerlGenerator::Template::locations{$id}++) { } 509 1435 1944
77 509 return "if"
78 #} elsif( $final ) {
79 # return " else "
80 } else {
81 1435 return "} elsif"
82 }
83 }
84  
85 3 1;
86 __END__
« PerlGenerator.pm ↑ Summary PerlGenerator/Template/Mojo.pm »