| 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
| |||||||||||
| 17 | 0 | croak "generator '$module' not found" | |||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | 4 | $module->new->generate($conf) | |||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | 3 | 1 | |||||||||
| 24 | |||||||||||
| 25 | __END__ | ||||||||||