To quote the documentation:
Frontier::Daemon takes a `methods' parameter, a hash that maps an incoming RPC method name to reference to a subroutine.
The Client side code for the example is
use Frontier::Client; my $url = "http://127.0.0.1/RPC2"; # Server my @args = (2,3); # values to pass to sum() # Create the client my $client = Frontier::Client->new( url => $url, debug => 0, ); print "$args[0] + $args[1] = ", $client->call('sum', @args), "\n";
So the client doing the calling can't pass the object refefence.
I can't do what chromatic said because I do not have an $obj at the point. (Remember that the call to the Daemon constructor never returns.)
I tried looking at the module source myself, but they do some weird stuff in there. Beyond my limited scope. (And they call it 'weird' themselves so they know it.) I'd post some of it here but it's on an innaccessble machine at the moment.
I didn't expect anyone to be familiar with the Frontier::Daemon, but I was hoping that someone who had used the HTTP::Daemon ran into the same situation as myself. They would have ran into the same problem as me.
In reply to Re^2: Missing object reference in sub
by Lazarus
in thread Missing object reference in sub
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |