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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.