| 1 | package OpenStack::MetaAPI::API; | ||||||||||
| 2 | |||||||||||
| 3 | 6 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 6 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | #use Moo::Role; | ||||||||||
| 7 | #use Moo; | ||||||||||
| 8 | |||||||||||
| 9 | sub get_service { | ||||||||||
| 10 | 8 | ▶ | my (%opts) = @_; | ||||||||
|
Subroutine
get_service: called CC=4 SCAR=14.2
Pod
undocumented
| |||||||||||
| 11 | |||||||||||
| 12 | 8 | ▶ | my $name = $opts{name} or die "name required"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 13 | 8 | ▶ | my $auth = ref($opts{auth}) or die "auth required"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | |||||||||||
| 15 | 8 | my $pkg = ucfirst $name; | |||||||||
| 16 | 8 | $pkg = __PACKAGE__ . "::$pkg"; | |||||||||
| 17 | |||||||||||
| 18 | 8 | ▶ | eval qq{ require $pkg; 1 } or die "Failed to load $pkg: $@"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | |||||||||||
| 20 | 8 | delete $opts{name}; | |||||||||
| 21 | |||||||||||
| 22 | 8 | return $pkg->new(%opts); | |||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 6 | 1; | |||||||||
| 26 | |||||||||||
| 27 | __END__ | ||||||||||
| 28 | |||||||||||
| 29 | =pod | ||||||||||
| 30 | |||||||||||
| 31 | =encoding UTF-8 | ||||||||||
| 32 | |||||||||||
| 33 | =head1 NAME | ||||||||||
| 34 | |||||||||||
| 35 | OpenStack::MetaAPI::API | ||||||||||
| 36 | |||||||||||
| 37 | =head1 VERSION | ||||||||||
| 38 | |||||||||||
| 39 | version 0.002 | ||||||||||
| 40 | |||||||||||
| 41 | =head1 AUTHOR | ||||||||||
| 42 | |||||||||||
| 43 | Nicolas R <atoomic@cpan.org> | ||||||||||
| 44 | |||||||||||
| 45 | =head1 COPYRIGHT AND LICENSE | ||||||||||
| 46 | |||||||||||
| 47 | This software is copyright (c) 2019 by cPanel, Inc. | ||||||||||
| 48 | |||||||||||
| 49 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 50 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 51 | |||||||||||
| 52 | =cut | ||||||||||