File Coverage

blib/lib/PONAPI/Client/Request/Role/HasUriSingle.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 single-resource requests
2             package PONAPI::Client::Request::Role::HasUriSingle;
3              
4 3     3   1616 use Moose::Role;
  3         7  
  3         20  
5              
6             has uri_template => (
7             is => 'ro',
8             isa => 'Str',
9             default => sub { '/{type}/{id}' },
10             );
11              
12             sub path {
13 8     8 0 18 my $self = shift;
14 8         246 return +{ type => $self->type, id => $self->id };
15             }
16              
17 3     3   15589 no Moose::Role; 1;
  3         6  
  3         15  
18              
19             __END__
20              
21             =pod
22              
23             =encoding UTF-8
24              
25             =head1 NAME
26              
27             PONAPI::Client::Request::Role::HasUriSingle - request - role - URI format for single-resource 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