Treat (Mozilla) Javascript objects as if they were Perl objects