http://www.perlmonks.org?node_id=901777

virtualweb has asked for the wisdom of the Perl Monks concerning the following question:

Hi:

I understand most applications for Cell Phones are developed in some Java versions, (J2ME), etc... but I know some Cell phones have a light version of the Windows Operating System, and perhaps there are others which might operate with some version of Unix or Linux.

Can anyone tell me if there are cell operating systems which might support perl..?? And Am I able to scrap the operating system my cell currently has and install one which supports perl..??

Thanx
Virtualweb

Replies are listed 'Best First'.
Re: Perl for Cell Phones
by Corion (Patriarch) on Apr 28, 2011 at 11:05 UTC

    Various cell phone operating systems have varying support for Perl. Most cell phones have bad support for Perl (or anything other than Java/J2ME):

    1. Nokia N900 - the star among the cell phones regarding an open OS. It runs Debian and comes with a full Perl 5.10. Unfortunately, the battery is really weak, the price is high, and the platform is dead. Integration into the phone/services API is mediocre - I believe you can get events via DBus.
    2. Android has Scripting Layer for Android (SL4A). It only provides a somewhat crippled version of Perl. Integration is mediocre to good. You get at the phone and other services, but launching a Perl program is quite cumbersome as you first need to launch SL4A, then select the Perl program to launch, and then launch that.
    3. Apple iPhone - it can be jailbroken and then you can basically run anything that BSD supports. It shouldn't be too hard to get Perl running. Integration into the phone/services API is nonexistent.
    4. Symbian S60 has/had a build of Perl for it, but it was 5.8.2 and was never maintained beyond Nokias short sponsoring of the port. Phone access never materialized, also, the platform is dead.
    5. Windows CE / Windows Mobile < 7 have or had native support in Perl. Crosscompiling Perl for it was and is tricky. I don't know about the APIs.
    6. I don't know anything about the Windows Mobile 7 platform and what it will support (beyond J2ME)
      I wonder if it's generally possible to script on the VM of J2ME... e.g. using JS via Rhino or Scala (or Clojure or JRuby or ...)

      Cheers Rolf

      On a rooted Android-devices there is one more option:

      You can set up a chrooted Debian-environment (or Ubuntu or whatever) in which you then can have a full Perl.

      On my HTC Desire HD I have a Debian with a working CPAN-shell (works even for XS-modules as I have a gcc installed).

      You can build the whole filesystem on a PC (using QEMU) and then only copy the image to the SD-card.

      The only downside is that with such a Perl you cannot use the Phone-features (e.g. taking a picture) which is really simple with SL4A, but you can access the internet without any problems.

Re: Perl for Cell Phones
by Anonymous Monk on Apr 28, 2011 at 11:00 UTC
Re: Perl for Cell Phones
by luis.roca (Deacon) on Apr 29, 2011 at 00:26 UTC