perl5 for JS via Emscripten.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cpan
dist/constant
ext
lib
t
web_repl
.gitignore
AUTHORS
EXTERN.h
INTERN.h
LICENSE
Makefile
Makefile_emcc
README.md
TODO.quicktask
TestInit.pm
XSUB.h
av.c
av.h
bitcount.h
caretx.c
charclass_invlists.h
common1.mak
config.h
cop.h
cv.h
deb.c
doio.c
doop.c
dquote_static.c
dump.c
embed.h
embedvar.h
emcc-embed-munge.pl
entry_point.js
feature.h
files_from_perl5163
form.h
generate_uudmap.c
git_version.h
globals.c
gv.c
gv.h
handy.h
hv.c
hv.h
hv_func.h
inline.h
inline_invlist.c
intrpvar.h
iperlsys.h
keywords.c
keywords.h
l1_char_class_tab.h
locale.c
mathoms.c
mg.c
mg.h
mg_data.h
mg_names.c
mg_raw.h
mg_vtable.h
microperl-pre.js
miniperlmain.c
miniperlmain_bak.c
mro.c
mydtrace.h
nostdio.h
numeric.c
op.c
op.h
op_reg_common.h
opcode.h
opnames.h
overload.c
overload.h
packsizetables.c
pad.c
pad.h
parser.h
patch-plu-js.pl
patchlevel.h
perl.c
perl.h
perl_eval.c
perl_eval_main.c
perlapi.c
perlapi.h
perlio.c
perlio.h
perliol.h
perlsdio.h
perlvars.h
perly.act
perly.c
perly.h
perly.tab
perly.y
pp.c
pp.h
pp_ctl.c
pp_hot.c
pp_pack.c
pp_proto.h
pp_sort.c
pp_sys.c
proto.h
reentr.c
reentr.h
regcharclass.h
regcomp.c
regcomp.h
regexec.c
regexp.h
regnodes.h
run.c
scope.c
scope.h
sv.c
sv.h
taint.c
thread.h
time64.c
time64.h
time64_config.h
toke.c
uconfig.h
uconfig.sh
uconfig64.sh
unicode_constants.h
universal.c
unixish.h
utf8.c
utf8.h
util.c
util.h
uudmap.h
vutil.c
vutil.h
vxs.inc
warnings.h

README.md

Live

About

This is perl without CPAN/POSIX/XS/Bundled Modules, aka just perl and none of the fluff. It is derived from the microperl and miniperl build files of the perl-5.16.3 code.

Installation

  • Linux
make
make plutest
./plu -e "print 'hello world'"
  • Emscripten (Console)
make -f Makefile_emcc CONSOLE=1
cat entry_point.js plu.js > plu.run.js
node plu.run.js virtual_file.pl
  • Emscripten (for Web)
make -f Makefile_emcc
cp plu.js to web_repl/js/microperl.js
Open web_repl/repl.html in a browser !

There is also a CONSOLE=1 make option which generates plu.console.js, for debugging.

Shoutout

TODO

  • Unit test emscripten code.
  • Write limitations.
  • Select a few CPAN modules for bundling.
  • REPL (Read-Eval-Print Loop) oriented towards beginners.
  • s/js/perl/ ? (Don't think so, but a possibility).
  • Experiment with the perl source code for fun and profit !

License

Artistic License 1 + GPLv1-or-above