#!/usr/bin/perl use strict; use warnings; use Frontier::Daemon; sub pow { my ($x, $y) = @_; return $x ** $y; } # Call me as http://localhost:8000/RPC2 my $methods = { 'pow' => \&pow, }; Frontier::Daemon->new( LocalPort => 8000, methods => $methods) or die "Couldn't start HTTP server: $!";