API.pm

filter: Statementstmt 100% 24 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 66.6% 2 / 3 totaltotal 96.9% 32 / 33 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« API/Parser/JSON.pm ↑ Summary API/Meta/Class.pm »
1 package Net::HTTP::API;
2  
3 # ABSTRACT: Easily create client for net API
4  
5 4 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 4 ▶use Moose::Exporter;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 4 ▶use Moose::Util::MetaRole;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 4 our $VERSION = '0.11';
10  
11 4 Moose::Exporter->setup_import_methods(
12 with_meta => [qw/net_api_method net_api_declare/],
13 also => [qw/Moose/]
14 );
15  
16 10 ▶sub net_api_method {
Subroutine net_api_method: called CC=1 SCAR=0.0
Pod documented
17 10 my $meta = shift;
18 10 my $name = shift;
19 10 $meta->add_net_api_method($name, @_);
20 }
21  
22 3 ▶sub net_api_declare {
Subroutine net_api_declare: called CC=1 SCAR=0.0
Pod documented
23 3 my $meta = shift;
24 3 my $name = shift;
25 3 $meta->add_net_api_declare($name, @_);
26 }
27  
28 5 ▶sub init_meta {
Subroutine init_meta: called CC=1 SCAR=0.0
Pod undocumented
29 5 my ($class, %options) = @_;
30  
31 5 my $for = $options{for_class};
32 5 Moose->init_meta(%options);
33  
34 5 my $meta = Moose::Util::MetaRole::apply_metaroles(
35 for => $for,
36 class_metaroles => {
37 class => ['Net::HTTP::API::Meta::Class'],
38 },
39 );
40  
41 5 Moose::Util::MetaRole::apply_base_class_roles(
42 for => $for,
43 roles => [
44 qw/
45 Net::HTTP::API::Role::UserAgent
46 Net::HTTP::API::Role::Format
47 Net::HTTP::API::Role::Authentication
48 Net::HTTP::API::Role::Serialization
49 Net::HTTP::API::Role::Request
50 /
51 ],
52 );
53  
54 5 $meta;
55 }
56  
57 4 1;
58  
59  
60 __END__
« API/Parser/JSON.pm ↑ Summary API/Meta/Class.pm »