Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Termux for all your Perl-needs on Android

by morgon (Priest)
on Mar 25, 2018 at 23:29 UTC ( [id://1211709]=perlmeditation: print w/replies, xml ) Need Help??

Hi,

I don't know how well known this is (it's probably quite old new for you) but recently I had the problem of wanting to run a Perl-script on a non-rooted Android-tablet and came across the fabulous Termux-project.

Installing this app gives you a terminal-environment and with a simple

pkg install perl

you get a working 5.26.1 perl. Now add

pkg install make pgk install clang

and voila you have a fully functional cpan-client that allows you to install even xs-modules.

Really nice...

Replies are listed 'Best First'.
Re: Termux for all your Perl-needs on Android
by Corion (Patriarch) on Mar 26, 2018 at 07:20 UTC

    Also very nice is that Termux comes with some command line utilities to query and set the state of Android functions and also to read and send SMS. This gives you a nice way to interact with Android from a Perl script without needing a module to talk to the Android API.

    All that's missing is a small wrapper module, maybe Android::Termux::API?

      The Termux-app together with the Termux:API-app gives you that.

      And it's not only texting ("SMS" to the germans).

      It e.g. also gives you access to the speech-synthesis that is (on my Fire 7) surprisingly good.

      Didn't you once explain something like that Androids file system is problematic when installing Perl modules?

      Was that a different approach?

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)
      Wikisyntax for the Monastery

        No, it is the same approach. Termux offers you to install some symlinks so you can have $HOME on a common directory, like the Downloads directory or something. But if you stay within Termux, you can only ever get access to files saved from within Termux, as Android basically runs every app as its own user. If you have root, you can still access other files.

Re: Termux for all your Perl-needs on Android
by morgon (Priest) on Mar 26, 2018 at 11:37 UTC
Re: Termux for all your Perl-needs on Android
by zentara (Archbishop) on Mar 26, 2018 at 15:01 UTC
    I've been lurking under a rock for quite some time, but this announcement got me to login and upvote. Great work! ++++

    I'm not really a human, but I play one on earth. ..... an animated JAPH
Re: Termux for all your Perl-needs on Android
by marto (Cardinal) on Mar 26, 2018 at 09:35 UTC

    Thanks, I need to check this out. I'd previously used CC Tools, but that was some time ago.

Re: Termux for all your Perl-needs on Android
by Anonymous Monk on Feb 26, 2019 at 14:37 UTC
    Termux worked great for me on Android 7.0 in Feb 2019. This also helped:
    pkg install perl pkg install make pkg install clang pkg install curl pkg install wget pkg install lftp pkg upgrade termux-setup-storage cpan cpan install HTTP::TINY cpan install (your other perl reference libraries here)
Re: Termux for all your Perl-needs on Android
by Bod (Parson) on Nov 20, 2020 at 09:42 UTC

    WoW!

    I've now got a more up to date version of Perl - 5.32 - on my mobile than I have on my laptop (should really update that) or my web server!

Re: Termux for all your Perl-needs on Android
by Anonymous Monk on Dec 27, 2019 at 13:41 UTC
    in the beginning of your (nice) post..

    "pkg install perl
    pkg install make“
    are ok..

    but..
    " pgk install clang"
    seemed to be.. a little bit wrong and not so hard to fix by a little permutation of a 'k' and a 'g'..

    thanks!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://1211709]
Approved by kcott
Front-paged by 1nickt
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-03-19 08:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found