| 1 | package Myriad::Example::Call; | ||
| 2 | our $VERSION = '1.001'; # VERSION | ||
| 3 | # To try this out, run: | ||
| 4 | # myriad.pl service Myriad::Example::Call rpc myriad.example.call/remote_call | ||
| 5 | 0 | ▶ | use Myriad::Service ':v1'; |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 6 | async method remote_call : RPC (%args) { | ||
| 7 | my $srv = await $api->service_by_name('myriad.example.call'); | ||
| 8 | return await $srv->target_method; | ||
| 9 | } | ||
| 10 | async method target_method : RPC { | ||
| 11 | return 'This is a method we call from within another service'; | ||
| 12 | } | ||
| 13 | 1; | ||