Any unblessed SCALAR reference that you pass from perl to javascrip will be wrapped as an instance of
Blessed ones will be normally a PerlObject.
var ref = new PerlScalar(mystr);
Creates a perl scalar with a copy of somevalue and returns a new reference to it. If you pass this object to perl land it will be undistinguishable from a normal reference.