Perl in small devices

I’ve participated in some discussions about running perl on small devices during the Perl Reunification Summit and YAPC::Europe.

The targets would be java/dalvik, objective-c/ios, and arduino. There is some work going on by Martin Berends (mberends++) on arduino, and Claes Jakobsson (claes++) on the jvm. Claes is working on reading and writing .class files.

We’ve discussed how they could use one of the Perlito parsers to implement a prototype, using either the ast-perl5 or ast-perl6 output:

$ node perlito5.js -Cast-perl5 -e ' print "hello, World!\n" ' > hello.ast5

Reini Urban (rurban++) showed me how to add type information to perl5 code:

$ perl -e '$int::; my int $x'

Type information would help the generated code to perform better and use less memory.

1 Comment

To target jvm/dalvik, i.e. translating perl5 opcodes to .class files, the easiest would be perlito or fork from B::C.

To target the iphone, I guess traditional cross-compilation would work best.
Interestingly now also for android.
PerlDroid seems to work now fine cross-compiled.
See e.g. http://code.google.com/p/perldroid/wiki/HowDoImportAClassInPerl

Larry also has a working Java interaction, but since perl had not enought type information, he calls perl from java.

Leave a comment

About Flávio S. Glock

user-pic I blog about Perl.