microperl fork
Switch branches/tags
Nothing to show
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.
lib
t
web_repl
.gitignore
AUTHORS
EXTERN.h
INTERN.h
LICENSE
Makefile
Makefile_emcc
README
TestInit.pm
XSUB.h
av.c
av.h
charclass_invlists.h
cop.h
cv.h
deb.c
doio.c
doop.c
dquote_static.c
dump.c
embed.h
embedvar.h
entry_point.js
feature.h
files_from_perl5163
form.h
generate_uudmap.c
globals.c
gv.c
gv.h
handy.h
hv.c
hv.h
intrpvar.h
iperlsys.h
keywords.c
keywords.h
l1_char_class_tab.h
locale.c
mathoms.c
mg.c
mg.h
mg_names.c
mg_raw.h
mg_vtable.h
miniperlmain.c
miniperlmain_bak.c
mro.c
mydtrace.h
numeric.c
op.c
op.h
op_reg_common.h
opcode.h
opnames.h
overload.c
overload.h
pad.c
pad.h
parser.h
patch-plu-js.pl
patchlevel.h
perl.c
perl.h
perlapi.c
perlapi.h
perlio.c
perlio.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
universal.c
unixish.h
utf8.c
utf8.h
util.c
util.h
warnings.h

README

Live
^^^^
http://themucker.github.io/plu/
Tested with FF17, FF20, C29
Does not work on mobile browsers

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

INSTALLING
^^^^^^^^^^
* Linux
> make
> make plutest
> plu -e "print 'hello world'"

* Emscripten (Console)
> CONSOLE=1 make -f Makefile_emcc
> (modify entry_point.js to add virtual files)**
> 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 the browser !

** https://github.com/kripken/emscripten/wiki/Filesystem-Guide
** the generated js file has two problemtic lines, in init
   method.

(near)1291: var devFolder = FS.createFolder('/', 'dev', true, true);
     change it to
     var devFolder = FS.findObject('/dev') || FS.createFolder('/', 'dev', true, true);


(near)1348: ... ALLOC_DYNAMIC ...
      change it to
      ALLOC_STATIC or ALLOC_NORMAL

**NOTE**
These two issues are fixed in emscripten as of Jun 3 2013.
see: https://github.com/kripken/emscripten/commit/e94f8f736b347d23d714f3b07cd44629f5b1ab93

web_repl/js/microperl.js has these patches applied

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

SHOUTOUT
^^^^^^^^
* http://kripken.github.io/lua.vm.js/lua.vm.js.html
  (for inspiration)
* Shlomi Fish (http://www.shlomifish.org/) from #perl for his patient testing
  and support.

TODO
^^^^
* unit test emscripten code
* write limitations
* select a few CPAN modules for bundling
* repl oriented towards beginners
* s/js/perl/ ? (Don't think so, but a possibility)
* experiment with perl source code for fun and profit !

LICENSE
^^^^^^^
(tl;dr Artistic License 1)