Skip to content


Subversion checkout URL

You can clone with
Download ZIP
84 lines (44 sloc) 2.11 KB
Using make:
- builds perlito5.js (which runs in node.js)
make test
- tests perlito5.js using node.js
make build-5browser
- builds html/perlito5.js (which runs in the browser)
-- See "Makefile" for more options
Running the tests using "node.js":
# this command will compile "perlito5.js"
perl -I./src5/lib -Cjs src5/util/ > perlito5.js
# this will run a single test script
node perlito5.js -Isrc5/lib t5/01-perlito/01-sanity.t
# this will run all tests
prove -r -e 'node perlito5.js -I./src5/lib' t5
Compile the compiler to Javascript into perlito5.js:
-- using perl and
perl -I./src5/lib -Cjs src5/util/ > perlito5.js
-- using node.js and perlito5.js:
node perlito5.js -I./src5/lib -Cjs src5/util/ > perlito5-new.js
Compile the compiler to Perl5 using perl:
perl -I./src5/lib -Cperl5 src5/util/ >
Compile perlito5-in-browser using perl:
perl util-js/
Running the tests using "perl":
# this will run all tests
prove -r -e 'perl -I./src5/lib ' t5
Bootstrap with perl:
time perl -Isrc5/lib -Cperl5 src5/util/ > && diff ; cp
Bootstrap with node.js:
time node perlito5.js -Isrc5/lib -Cjs src5/util/ > perlito5-new.js && diff perlito5-new.js perlito5.js ; cp perlito5-new.js perlito5.js
Minifying the javascript output:
The "jsmin" compressor seems to work, it gives 20% compression:
$ sudo port install jsmin # osx
$ jsmin < perlito5.js > mini-perlito5.js
$ nice prove -r -e 'node mini-perlito5.js -I./src5/lib' t5
All tests successful.
Running the tests using perl6:
# TODO - this is not implemented yet
. util-perl6/
find t5/01-perlito/*.t | perl -ne ' print "*** $_"; chomp; print ` perl -I./src5/lib -Cperl6 $_ > tmp.p6 && perl6 tmp.p6 ` '
Jump to Line
Something went wrong with that request. Please try again.