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