Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

interpret ECMAScript from Perl5 (thanks to Google V8)

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 inc
Octocat-spinner-32 lib
Octocat-spinner-32 t
Octocat-spinner-32 Changes
Octocat-spinner-32 MANIFEST
Octocat-spinner-32 META.yml
Octocat-spinner-32 Makefile.PL
Octocat-spinner-32 Makefile.old
Octocat-spinner-32 README
Octocat-spinner-32 README.md
Octocat-spinner-32 V8.xs
Octocat-spinner-32 bridge.cc
Octocat-spinner-32 bridge.h
Octocat-spinner-32 bridge.mk
Octocat-spinner-32 ppport.h
Octocat-spinner-32 sample.pl
Octocat-spinner-32 typemap
README.md

perl-v8

This is a Perl5 extension module that lets you interpret JavaScript by way of Google's V8 ECMAScript/JavaScript interpreter.

The original code for this was lifted from a Japanese message board of some sort.

I am not the original author of this code! I just fixed one bug, added a test for make test, and put it up on GitHub for others to find and improve upon. When I found this code, it was (and is, as of July 12, 2009) the only perl binding for V8.

This code works fine for me but I would really be happy to turn this over to someone who is more of an expert in XS.

I do not have a CPAN account (yet?) and of course that's where all Perl modules should ultimately live. Once I get some feedback or a new maintainer approaches me, we'll move this module there. Also, V8 is not the best module name (no namespace).

Installation

Download, build, and install v8.

svn checkout http://v8.googlecode.com/svn/trunk/ v8

cd v8

scons 

sudo mv include/v8.h /usr/local/include/

sudo mv libv8.a /usr/local/lib/

Install prerequisite modules

sudo cpan Module::Install

Build the v8 "bridge"

make -f bridge.mk

Build the perl extension module.

perl Makefile.PL

make

make test

sudo make install

Try it out.

perl sample.pl

Dependencies

This module requires these other modules and libraries:

libv8

Module::Install

Copyright and Licence

Copyright (C) 2009 by Fictorial LLC.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.

Something went wrong with that request. Please try again.