PONAPI/Builder/Resource/Identifier.pm

filter: Statementstmt 100% 17 / 17 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 0.0% 0 / 1 totaltotal 95.6% 22 / 23 CC 2 SCAR 4.1
CC
2
Cov
100%
build
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.5
« Test/PONAPI/Repository/MockDB/Table/Articles.pm ↑ Summary PONAPI/DAO/Request/Delete.pm »
1 # ABSTRACT: document builder - resource identifier
2 package PONAPI::Builder::Resource::Identifier;
3  
4 34 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 34 with 'PONAPI::Builder',
7 'PONAPI::Builder::Role::HasMeta';
8  
9 34 has id => ( is => 'ro', isa => 'Str', required => 1 );
10 34 has type => ( is => 'ro', isa => 'Str', required => 1 );
11  
12 sub build {
13 519 ▶ my $self = $_[0];
Subroutine build: called CC=2 SCAR=6.9
Pod undocumented
14 519 my $result = {};
15  
16 519 $result->{id} = $self->id;
17 519 $result->{type} = $self->type;
18 519 ▶ $result->{meta} = $self->_meta if $self->has_meta;
Branch: 1 branch
BranchTrueFalseTotal
if $self->has_meta 2 517 519
19  
20 519 return $result;
21 }
22  
23 34 __PACKAGE__->meta->make_immutable;
24 34 ▶no Moose; 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
25  
26 __END__
27  
28 =pod
29  
30 =encoding UTF-8
31  
32 =head1 NAME
33  
34 PONAPI::Builder::Resource::Identifier - document builder - resource identifier
35  
36 =head1 VERSION
37  
38 version 0.002012
39  
40 =head1 AUTHORS
41  
42 =over 4
43  
44 =item *
45  
46 Mickey Nasriachi <mickey@cpan.org>
47  
48 =item *
49  
50 Stevan Little <stevan@cpan.org>
51  
52 =item *
53  
54 Brian Fraser <hugmeir@cpan.org>
55  
56 =back
57  
58 =head1 COPYRIGHT AND LICENSE
59  
60 This software is copyright (c) 2016 by Mickey Nasriachi, Stevan Little, Brian Fraser.
61  
62 This is free software; you can redistribute it and/or modify it under
63 the same terms as the Perl 5 programming language system itself.
64  
65 =cut
« Test/PONAPI/Repository/MockDB/Table/Articles.pm ↑ Summary PONAPI/DAO/Request/Delete.pm »