JS::JSORB - Javascript client for JSORB
# in your Perl ... use JS::JSORB; my $js_jsorb = JS::JSORB->new; # get a Path::Class::File # representing the path to # the JSORB.js file my $jsorb_js_file = $js_jsorb->file; # install a local copy $js_jsorb->copy_file_to( '/webroot/js/JSORB.js' ); // in your javascript ... var c = new JSORB.Client ({ base_url : 'http://localhost:8080/', }) c.call({ method : '/math/simple/add', params : [ 2, 2 ] }, function (result) { alert(result) });
This is basically the JS:: module for the JSORB Javascript client. If you don't know about JS.pm, you should really check it out.
We also provide some basic functions to make it easy for you to retrieve the path to the installed JSORB.js file, to slurp the contents of the file into a string and to copy the file into another directory (such as your web directory).
This returns Path::Class::File instance that represents the path to the JSORB.js file.
This will copy the JSORB.js file to $dest.
$dest
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT.
Stevan Little <stevan.little@iinteractive.com>
Copyright 2008-2010 Infinity Interactive, Inc.
http://www.iinteractive.com
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install JSORB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm JSORB
CPAN shell
perl -MCPAN -e shell install JSORB
For more information on module installation, please visit the detailed CPAN module installation guide.