Perl5 modules in javascript
To make possible the use of Perl5 modules in Javascript code.
This is desirable for two reasons:
- Some functionality (e.g. validating forms, rendering templates) can be shared between the server and the browser, without the need to write and maintain it in two separate files in two separate languages
- Server-side functionality can be written in perl and run on any server-side javascript platform, such as nodejs, iojs, or meteor. This could be a legacy perl codebase, or complex functionality that would be longwinded to write and difficult to maintain in javascript.
This package is currently powered by Perlito, which transpiles perl to js (among other languages) but lacks a practical interface for using your transpiled code in javascript.
$ perl-to-js.pl help
Usage:
perl-to-js.pl bundle <module>... [--include <directory>]... [--output <file>]
perl-to-js.pl interface [--output <file>]
perl-to-js.pl help [--output <file>]
perl-to-js.pl version [--output <file>]
Options:
--include <directory> an @INC directory (any number allowed)
--output <file> the file to write to [default: STDOUT]
... See the CLI script for now
... See the perl dummy module and the javascript test for now
- Perl5 v5.10.1 or higher
- Initial alpha release
- make: one
encode
function to tie together encodeScalar+encodeArray+encodeHash+encodeSub... same fordecode
- Dummy::Subs
- use CPAN standards for distribution packages
- add notes in readme about getting set up
- add PerlObject class
- give perl modules a way of knowing if its running in perl, node, or the browser ("isomorphic" ability)!
- use node and or a headless browser for automated tests, use Travis CI
- add support for expanding
use
statements (either here or in Perlito) - move Perlito runtime from each bundle to the singular PerlToJs runtime
- support commonj-esque (i.e. node & browserify) javascript module format