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:

    $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:



This method transforms the passed in arguments to their JSON string representations.

Things that match /^(?:[1-9][0-9]*|0+)$/ get passed through.

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.

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.


Readonly accessor for the internal object id that connects the Javascript object to the Perl object.


Accessor for the callback that gets invoked from DESTROY.


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


Max Maischein


Copyright 2011 by Max Maischein


This module is released under the same terms as Perl itself.