Acme-RPC
view release on metacpan or search on metacpan
lib/Acme/RPC.pm view on Meta::CPAN
As above, takes argument data from C<arg0>, C<arg1>, C<arg2>, etc.
=item C<< lazy=1 >>
Avoid rebuilding the entire object graph to speed things up a bit.
=head2 TODO
C<oidarg[n]> to pass in an arbitrary other object as a parameter.
JSON posted to the server to specify arguments.
JSON posted to the server to specify the entire function/method call.
=head2 BUGS
There is no security. At all.
A lot of this stuff hasn't been tested. At all.
You will leak memory like crazy.
Really, I wasted about three days on this, so I'm very much in a "it compiles, ship it!" mode.
lib/Acme/RPC.pm view on Meta::CPAN
open STDERR, '>&', $olderr;
close $olderr;
$buf =~ s{(0x[a-f0-9]{6,})}{<a href="?oid=$1">$1</a>}g;
# $oid =~ m/^0x[0-9a-f]{8,}$/
# my $ob = Devel::Pointer::deref(hex($oid));
my $ob = Devel::Pointer::deref($oid);
my $buf = Data::Dumper::Dumper($ob);
# $buf =~ s{(0x[a-f0-9]{6,})}{<a href="?oid=$1">$1</a>}g;
$request->print(qq{<pre>$buf</pre>\n});
* Accepts posts as well, and handle by data type.
Posts to CODE refs run them with the arguments (attempt to reconstitute object references in the arguments... move to 0x style oids again
to support this).
Posts to object references (blessed things) invoke the named method in them (again, reconstituting the args).
Posts to scalars, arrays, hashes, etc merely replace their data.
( run in 2.799 seconds using v1.01-cache-2.11-cpan-ceb78f64989 )