File Coverage

blib/lib/PONAPI/Client/Request/Role/HasUriRelationships.pm
Criterion Covered Total %
statement 8 8 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod 0 1 0.0
total 11 12 91.6


line stmt bran cond sub pod time code
1             # ABSTRACT: request - role - URI format for relationships requests
2             package PONAPI::Client::Request::Role::HasUriRelationships;
3              
4 1     1   544 use Moose::Role;
  1         3  
  1         7  
5              
6             has uri_template => (
7             is => 'ro',
8             isa => 'Str',
9             default => sub { '/{type}/{id}/relationships/{rel_type}' },
10             );
11              
12             sub path {
13 1     1 0 2 my $self = shift;
14 1         35 return +{ type => $self->type, id => $self->id, rel_type => $self->rel_type };
15             }
16              
17 1     1   5262 no Moose::Role; 1;
  1         6  
  1         5  
18              
19             __END__
20              
21             =pod
22              
23             =encoding UTF-8
24              
25             =head1 NAME
26              
27             PONAPI::Client::Request::Role::HasUriRelationships - request - role - URI format for relationships requests
28              
29             =head1 VERSION
30              
31             version 0.002012
32              
33             =head1 AUTHORS
34              
35             =over 4
36              
37             =item *
38              
39             Mickey Nasriachi <mickey@cpan.org>
40              
41             =item *
42              
43             Stevan Little <stevan@cpan.org>
44              
45             =item *
46              
47             Brian Fraser <hugmeir@cpan.org>
48              
49             =back
50              
51             =head1 COPYRIGHT AND LICENSE
52              
53             This software is copyright (c) 2019 by Mickey Nasriachi, Stevan Little, Brian Fraser.
54              
55             This is free software; you can redistribute it and/or modify it under
56             the same terms as the Perl 5 programming language system itself.
57              
58             =cut