NAME
JS::JSORB - Javascript client for JSORB
SYNOPSIS
# 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)
});
DESCRIPTION
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).
METHODS
- file
-
This returns Path::Class::File instance that represents the path to the JSORB.js file.
- copy_file_to( $dest )
-
This will copy the JSORB.js file to
$dest
.
BUGS
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.
AUTHOR
Stevan Little <stevan.little@iinteractive.com>
COPYRIGHT AND LICENSE
Copyright 2008-2010 Infinity Interactive, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.