File Coverage

blib/lib/Perinci/Access/Base/Patch/PeriAHS.pm
Criterion Covered Total %
statement 9 11 81.8
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 13 15 86.6


line stmt bran cond sub pod time code
1             package Perinci::Access::Base::Patch::PeriAHS;
2              
3 2     2   36 use 5.010;
  2         7  
4 2     2   11 use strict;
  2         5  
  2         36  
5 2     2   10 use warnings;
  2         5  
  2         67  
6              
7 2     2   1019 use Module::Patch 0.12 qw();
  0            
  0            
8             use base qw(Module::Patch);
9             use Perinci::Result::Format;
10              
11             our $VERSION = '0.60'; # VERSION
12              
13             sub patch_data {
14             return {
15             v => 3,
16             patches => [
17             {
18             action => 'add',
19             mod_version => ':all',
20             sub_name => 'actionmeta_srvinfo',
21             code => sub { +{
22             applies_to => ['*'],
23             summary => "Get information about server",
24             } }
25             },
26              
27             {
28             action => 'add',
29             mod_version => ':all',
30             sub_name => 'action_srvinfo',
31             code => sub {
32             my ($self, $uri, $extra) = @_;
33              
34             [200, "OK", {
35             srvurl => "TODO",
36             fmt => [keys %Perinci::Result::Format::Formats],
37             }];
38             }
39             },
40             ],
41             };
42             }
43              
44             1;
45             # ABSTRACT: Patch for Perinci::Access::Base
46              
47             __END__
48              
49             =pod
50              
51             =encoding UTF-8
52              
53             =head1 NAME
54              
55             Perinci::Access::Base::Patch::PeriAHS - Patch for Perinci::Access::Base
56              
57             =head1 VERSION
58              
59             This document describes version 0.60 of Perinci::Access::Base::Patch::PeriAHS (from Perl distribution Perinci-Access-HTTP-Server), released on 2016-03-16.
60              
61             =head1 DESCRIPTION
62              
63             This patch adds several extra PeriAHS-related actions into
64             L<Perinci::Access::Base>. Currently: C<srvinfo>.
65              
66             =head1 HOMEPAGE
67              
68             Please visit the project's homepage at L<https://metacpan.org/release/Perinci-Access-HTTP-Server>.
69              
70             =head1 SOURCE
71              
72             Source repository is at L<https://github.com/sharyanto/perl-Perinci-Access-HTTP-Server>.
73              
74             =head1 BUGS
75              
76             Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Perinci-Access-HTTP-Server>
77              
78             When submitting a bug or request, please include a test-file or a
79             patch to an existing test-file that illustrates the bug or desired
80             feature.
81              
82             =head1 SEE ALSO
83              
84             L<Perinci::Access::HTTP::Server>
85              
86             =head1 AUTHOR
87              
88             perlancar <perlancar@cpan.org>
89              
90             =head1 COPYRIGHT AND LICENSE
91              
92             This software is copyright (c) 2016 by perlancar@cpan.org.
93              
94             This is free software; you can redistribute it and/or modify it under
95             the same terms as the Perl 5 programming language system itself.
96              
97             =cut