MozRepl::RemoteObject::Methods - Perl methods for mozrepl objects
my @links = $obj->MozRepl::RemoteObject::Methods::xpath('//a');
This module holds the routines that previously lived as injected object methods on all Javascript objects.
$obj->MozRepl::RemoteObject::Methods::invoke(METHOD, ARGS)
The invoke() object method is an alternate way to invoke Javascript methods. It is normally equivalent to $obj->$method(@ARGS). This function must be used if the METHOD name contains characters not valid in a Perl variable name (like foreign language characters). To invoke a Javascript objects native __invoke method (if such a thing exists), please use:
invoke()
$obj->$method(@ARGS)
__invoke
$object->MozRepl::RemoteObject::Methods::invoke('__invoke', @args);
This method can be used to call the Javascript functions with the same name as other convenience methods implemented in Perl:
__attr __setAttr __xpath __click ...
$obj->MozRepl::RemoteObject::Methods::transform_arguments(@args)
This method transforms the passed in arguments to their JSON string representations.
Things that match /^(?:[1-9][0-9]*|0+)$/ get passed through.
/^(?:[1-9][0-9]*|0+)$/
MozRepl::RemoteObject::Instance instances are transformed into strings that resolve to their Javascript global variables. Use the ->expr method to get an object representing these.
->expr
It's also impossible to pass a negative or fractional number as a number through to Javascript, or to pass digits as a Javascript string.
$obj->MozRepl::RemoteObject::Methods::id
Readonly accessor for the internal object id that connects the Javascript object to the Perl object.
$obj->MozRepl::RemoteObject::Methods::on_destroy
Accessor for the callback that gets invoked from DESTROY.
DESTROY
$obj->MozRepl::RemoteObject::Methods::bridge
Readonly accessor for the bridge that connects the Javascript object to the Perl object.
MozRepl::RemoteObject for the objects to use this with
The public repository of this module is http://github.com/Corion/mozrepl-remoteobject.
Max Maischein corion@cpan.org
corion@cpan.org
Copyright 2011 by Max Maischein corion@cpan.org.
This module is released under the same terms as Perl itself.
To install MozRepl::RemoteObject, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MozRepl::RemoteObject
CPAN shell
perl -MCPAN -e shell install MozRepl::RemoteObject
For more information on module installation, please visit the detailed CPAN module installation guide.