Generator.pm

filter: Statementstmt 95.2% 20 / 21 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 93.1% 27 / 29 SCAR 6.9
CC
2
Cov
91%
openapi_from
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« Generator/Util.pm ↑ Summary
1 package OpenAPI::Generator;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 ▶use Exporter qw(import);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 3 our $VERSION = '0.05';
10 3 our @EXPORT = qw(openapi_from);
11  
12 sub openapi_from {
13 4 ▶ my($module, $conf) = @_;
Subroutine openapi_from: called CC=2 SCAR=7.2
Pod documented
14 4 $module = 'OpenAPI::Generator::From::'.join('', map { ucfirst lc } split /_/, "$module");
15  
16 4 ▶ unless (eval "require $module") {
Branch: 1 branch
BranchTrueFalseTotal
unless (eval "require $module") 0 4 4
17 0 croak "generator '$module' not found"
18 }
19  
20 4 $module->new->generate($conf)
21 }
22  
23 3 1
24  
25 __END__
« Generator/Util.pm ↑ Summary