| 1 | package WWW::MailboxOrg::Role::RPC; | ||
| 2 | |||
| 3 | # ABSTRACT: Role for RPC API controllers | ||
| 4 | |||
| 5 | use Moo::Role; | ||
| 6 | |||
| 7 | our $VERSION = '0.001'; | ||
| 8 | |||
| 9 | requires 'client'; | ||
| 10 | |||
| 11 | sub _rpc { | ||
| 12 | my ($self, $method, @params) = @_; | ||
| 13 | my $client = $self->client or croak "No client set"; | ||
| 14 | return $client->call($method, @params); | ||
| 15 | } | ||
| 16 | |||
| 17 | 1; | ||
| 18 | |||
| 19 | __END__ | ||
| 20 | |||
| 21 | =pod | ||
| 22 | |||
| 23 | =encoding UTF-8 | ||
| 24 | |||
| 25 | =head1 NAME | ||
| 26 | |||
| 27 | WWW::MailboxOrg::Role::RPC - Role for RPC API controllers | ||
| 28 | |||
| 29 | =head1 VERSION | ||
| 30 | |||
| 31 | version 0.001 | ||
| 32 | |||
| 33 | =head1 NAME | ||
| 34 | |||
| 35 | WWW::MailboxOrg::Role::RPC - Role for RPC API controllers | ||
| 36 | |||
| 37 | =cut | ||
| 38 | |||
| 39 | =head1 SUPPORT | ||
| 40 | |||
| 41 | =head2 Issues | ||
| 42 | |||
| 43 | Please report bugs and feature requests on GitHub at | ||
| 44 | L<https://github.com/getty/p5-www-mailboxorg/issues>. | ||
| 45 | |||
| 46 | =head2 IRC | ||
| 47 | |||
| 48 | Join C<#perl-help> on C<irc.perl.org> or message Getty directly. | ||
| 49 | |||
| 50 | =head1 CONTRIBUTING | ||
| 51 | |||
| 52 | Contributions are welcome! Please fork the repository and submit a pull request. | ||
| 53 | |||
| 54 | =head1 AUTHOR | ||
| 55 | |||
| 56 | Torsten Raudssus <getty@cpan.org> | ||
| 57 | |||
| 58 | =head1 COPYRIGHT AND LICENSE | ||
| 59 | |||
| 60 | This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> L<https://raudssus.de/>. | ||
| 61 | |||
| 62 | This is free software; you can redistribute it and/or modify it under | ||
| 63 | the same terms as the Perl 5 programming language system itself. | ||
| 64 | |||
| 65 | =cut |