File Coverage

blib/lib/HTTP/Throwable/Role/Status/Conflict.pm
Criterion Covered Total %
statement 8 8 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 0 2 0.0
total 12 14 85.7


line stmt bran cond sub pod time code
1             package HTTP::Throwable::Role::Status::Conflict;
2             our $AUTHORITY = 'cpan:STEVAN';
3             $HTTP::Throwable::Role::Status::Conflict::VERSION = '0.027';
4 1     1   697 use Moo::Role;
  1         4  
  1         7  
5              
6             with(
7             'HTTP::Throwable',
8             'HTTP::Throwable::Role::BoringText',
9             );
10              
11 2     2 0 84 sub default_status_code { 409 }
12 2     2 0 7742 sub default_reason { 'Conflict' }
13              
14 1     1   425 no Moo::Role; 1;
  1         3  
  1         5  
15              
16             =pod
17              
18             =encoding UTF-8
19              
20             =head1 NAME
21              
22             HTTP::Throwable::Role::Status::Conflict - 409 Conflict
23              
24             =head1 VERSION
25              
26             version 0.027
27              
28             =head1 DESCRIPTION
29              
30             The request could not be completed due to a conflict with
31             the current state of the resource. This code is only allowed
32             in situations where it is expected that the user might be able
33             to resolve the conflict and resubmit the request. The response
34             body SHOULD include enough information for the user to recognize
35             the source of the conflict. Ideally, the response entity would
36             include enough information for the user or user agent to fix
37             the problem; however, that might not be possible and is not
38             required.
39              
40             Conflicts are most likely to occur in response to a PUT request.
41             For example, if versioning were being used and the entity being
42             PUT included changes to a resource which conflict with those
43             made by an earlier (third-party) request, the server might use
44             the 409 response to indicate that it can't complete the request.
45             In this case, the response entity would likely contain a list of
46             the differences between the two versions in a format defined by
47             the response Content-Type.
48              
49             =head1 AUTHORS
50              
51             =over 4
52              
53             =item *
54              
55             Stevan Little
56              
57             =item *
58              
59             Ricardo Signes
60              
61             =back
62              
63             =head1 COPYRIGHT AND LICENSE
64              
65             This software is copyright (c) 2011 by Infinity Interactive, Inc.
66              
67             This is free software; you can redistribute it and/or modify it under
68             the same terms as the Perl 5 programming language system itself.
69              
70             =cut
71              
72             __END__