Generator.pm

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