Run Perl in the browser with WebPerl!
[ Using - Building - đŠ - Notes - Legal - Wiki ]
Other places Iâve written about WebPerl:
Guacamole at The Perl Conference in the Cloud 2020Several people have built microperl with Emscripten:
Testing
WebPerl.t
make test find and handle all the various modulesâ ts?Misc
Future
Future::AsyncAwait work in WebPerl? (Or maybe with a JS backend?)Future::HTTP (probably just as a frontend to XHR?)STDOUT currently gets output with HTML escapesPerl.Util functions for making file uploads and downloads easier
Perl.glue() and Perl.dispatch() could go into WebPerl.xs (?)webperl.js could go into common_preamble.js or WebPerl.xs,
so that emperl.js is runnable on its own in a Web Worker (?)
(see notes in perlrunner.html / e12f1aa25a000)
â this might be interesting for running tests?!nodeperl_dev_prerun.js could probably be merged into that as wellWebPerl stub on CPAN
WebPerl::Local that contains the WebPerl API, and
have various drivers such as WebPerl::WebDriver or WebPerl::JSAny that
runs the code given to WebPerlâs js()âŠSee Also
TODOs in the source tree by grepping for TODO
or using the included findtodo.sh.$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout selfsigned.key -out selfsigned.crt
...
Common Name (e.g. server FQDN or YOUR name) []: localhost
...
$ plackup --enable-ssl --ssl-key-file=selfsigned.key --ssl-cert-file=selfsigned.crt web/webperl.psgi
# then go to https://localhost:5000 and accept the certificate warning
system, qx, fork, kill, wait, waitpid, threads, etc.
system and qx support could theoretically be added by patching pp_system/pp_backtick in pp_sys.c)SIGALRM)exit is not supported, and therefore atexit handlers arenât supported
(see discussion in Using WebPerl, and NO_EXIT_RUNTIME in the Emscripten documentation -
currently it seems to make the most sense to build with NO_EXIT_RUNTIME=1)Update Changes.md with all changes since last release
As an example, to list changes since a specific version, excluding the regex tester:
$ git log --stat v0.05-beta.. -- . ':!web/regex_tester.html' ':!.gitignore'
using.md etc. mentions when features were added/deprecatedUpdate version numbers everywhere; use grep to find them, for example:
$ grep -Er --exclude-dir=hostperl --exclude-dir=.git --exclude-dir=emperl5 --exclude=emperl.* '0\.[01][0-9]' .
$ ( cd emperl5; grep -Er '0\.[01][0-9]' `git diff --numstat --diff-filter=ACMRT v5.28.1 HEAD | cut -f3` )
At a minimum there is:
web/webperl.js - Perl.WebPerlVersionemperl5/ext/WebPerl/lib/WebPerl.pm - $VERSIONpages/index.md and pages/using.md - download linksUpdate Subresource Integrity values as needed, e.g.:
$ perl -wMstrict -MDigest::SRI=sri -le 'print sri "SHA-256","web/webperl.js"'
Build and create dist, e.g. build/build.pl --reconfig --dist=webperl_prebuilt_v0.07-beta
Test all build results, both from file://... and http://localhost
Add tags, the webperl repo gets an annotated tag such as v0.07-beta,
and the emperl5 repo gets an unannotated tag such as webperl_v0.07-beta,
then git push --tags
Create a release on GitHub and upload the webperl_prebuilt_*.zip as an asset
for X in emperl.* webperl.js; do gzip -v -9 $X && mv -v $X.gz $X ; doneContent-Type (see e.g. web/webperl.psgi) and a Content-Encoding of gzippages_for_vX.XX branch of gh-pages, donât forget to merge thatCopyright (c) 2018 Hauke Daempfling (haukex@zero-g.net) at the Leibniz Institute of Freshwater Ecology and Inland Fisheries (IGB), Berlin, Germany, http://www.igb-berlin.de
Please see the âLegalâ page for details.
You can find the source for this page at https://github.com/haukex/webperl/blob/gh-pages/notes.md