in reply to Re: Missing object reference in sub
in thread Missing object reference in sub
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Missing object reference in sub
by chromatic (Archbishop) on Sep 26, 2007 at 20:49 UTC | |
by almut (Canon) on Sep 26, 2007 at 21:10 UTC | |
by chromatic (Archbishop) on Sep 26, 2007 at 23:09 UTC | |
by Lazarus (Novice) on Sep 28, 2007 at 13:55 UTC | |
|
Re^3: Missing object reference in sub
by almut (Canon) on Sep 26, 2007 at 20:46 UTC | |
by Lazarus (Novice) on Sep 28, 2007 at 14:04 UTC | |
|
Re^3: Missing object reference in sub
by kyle (Abbot) on Sep 26, 2007 at 21:38 UTC | |
by almut (Canon) on Sep 26, 2007 at 22:10 UTC |