MailboxOrg/API/System.pm

filter: Statementstmt 57.1% 12 / 21 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 42.8% 3 / 7 Podpod 100% 3 / 3 totaltotal 54.5% 18 / 33 CC 2 SCAR 9.7
CC
2
Cov
52%
_rpc
6.0
hello
2.0
test
2.0
CRAP 2.6
« MailboxOrg/API/Validate.pm ↑ Summary MailboxOrg/Role/RPC.pm »
1 package WWW::MailboxOrg::API::System;
2  
3 # ABSTRACT: System API (hello, test, capabilities)
4  
5 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use MooX::Singleton;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 our $VERSION = '0.001';
10  
11 1 has client => (
12 is => 'ro',
13 required => 1,
14 weak_ref => 1,
15 );
16  
17 sub _rpc {
18 0 ▶ my ($self, $method, @params) = @_;
Subroutine _rpc: not called CC=2 SCAR=17.9
19 0 ▶ my $client = $self->client or croak "No client set";
Branch: 1 branch
BranchTrueFalseTotal
my $client = $self->client or croak("No client set") 0 0 0
20 0 return $client->call($method, @params);
21 }
22  
23 sub hello {
24 0 ▶ my ($self) = @_;
Subroutine hello: not called CC=1 SCAR=6.9
Pod documented
25 0 return $self->_rpc('hello');
26 }
27  
28 sub test {
29 0 ▶ my ($self) = @_;
Subroutine test: not called CC=1 SCAR=6.9
Pod documented
30 0 return $self->_rpc('test');
31 }
32  
33 sub capabilities {
34 0 ▶ my ($self) = @_;
Subroutine capabilities: not called CC=1 SCAR=6.9
Pod documented
35 0 return $self->_rpc('capabilities');
36 }
37  
38 1 1;
39  
40 __END__
41  
42 =pod
43  
44 =encoding UTF-8
45  
46 =head1 NAME
47  
48 WWW::MailboxOrg::API::System - System API (hello, test, capabilities)
49  
50 =head1 VERSION
51  
52 version 0.001
53  
54 =head1 NAME
55  
56 WWW::MailboxOrg::API::System - System API (hello, test, capabilities)
57  
58 =head2 hello
59  
60 my $result = $api->system->hello;
61  
62 Get API hello response. No parameters required.
63  
64 =head2 test
65  
66 my $result = $api->system->test;
67  
68 Test API connection. Returns test result.
69  
70 =head2 capabilities
71  
72 my $caps = $api->system->capabilities;
73  
74 Get API capabilities. Returns capability list.
75  
76 =cut
77  
78 =head1 SUPPORT
79  
80 =head2 Issues
81  
82 Please report bugs and feature requests on GitHub at
83 L<https://github.com/getty/p5-www-mailboxorg/issues>.
84  
85 =head2 IRC
86  
87 Join C<#perl-help> on C<irc.perl.org> or message Getty directly.
88  
89 =head1 CONTRIBUTING
90  
91 Contributions are welcome! Please fork the repository and submit a pull request.
92  
93 =head1 AUTHOR
94  
95 Torsten Raudssus <getty@cpan.org>
96  
97 =head1 COPYRIGHT AND LICENSE
98  
99 This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> L<https://raudssus.de/>.
100  
101 This is free software; you can redistribute it and/or modify it under
102 the same terms as the Perl 5 programming language system itself.
103  
104 =cut
« MailboxOrg/API/Validate.pm ↑ Summary MailboxOrg/Role/RPC.pm »