Ubuntu – Building Full Perl Support in Ubuntu SDK

application-developmentperlqtubuntu-sdkubuntu-touch

I am running Ubuntu v14.04, and after some effort, I have successfully installed the Ubuntu SDK.

I need to use Perl + QML/Qt to develop a (potentially large) number of fully-functional apps through the Ubuntu SDK, which can then run "convergently" on both desktop Ubuntu as well as on the Ubuntu phone platform. The Qt bindings for Perl are out of date, but I am willing to re-implement updated Qt bindings myself, for use when Perl is running in normal interpreted mode.

https://metacpan.org/pod/QtCore4

Also, I will be using the new Perl compiler (I am the author), so we can generate C++ output code which directly calls Qt, for use when Perl is running in Perl compiled mode.

http://rperl.org

Apparently, the interface to Qt is different if we use Perl in normal interpreted mode vs. RPerl compiled mode, although from the Perl side of things both modes are considered valid and should be (mostly) technically equivalent, as long as I do a good job implementing the updated Qt bindings.

Relatedly, I know that the Ubuntu SDK strongly supports C++, and Python is (at least partially) supported as well, but I can't seem to find any good tutorials about using either C++ or Python to build Ubuntu SDK apps. Since Python is similar to Perl interpreted mode, and C++ is similar to Perl compiled mode, I was hoping to find some helpful examples to go from, but no luck so far…

So, my three interrelated questions are:

  1. How do I enable support for interpreted Perl with my to-be-created Qt bindings, for use as the "logic" language when building an app in the Ubuntu SDK?

  2. How do I enable support for compiled Perl which outputs C++ with native Qt bindings, again for use as the "logic" language when building an app in the Ubuntu SDK?

  3. How did the Ubuntu community enable support for Python, again for use as the "logic" language when building an app in the Ubuntu SDK?

Thanks in advance! 🙂

UPDATE Nov 14 2017:

Unity and Ubuntu Mobile are now being retired by Canonical, although the open source community may choose to carry forth with one or both projects, so I am still interested in any Perl-in-Ubuntu-SDK answers you may have, thanks!

Best Answer

You could import all modules altogether into your project with perl, where you want to set up a script. It is described here:

https://www.perlmonks.org/?node_id=798650

And here it is described how this can be automated:

https://stackoverflow.com/questions/24908530/perl-use-all-modules-from-specified-subdirectory-and-solve-its-dependencies-a

Load and autoload are two different things :

https://perldoc.perl.org/Module/Load.html

I think it is not dependent whether Ubuntu would build a full Perl SDK or if you would solve this for to create a Perl environment - suiting to you on your machine.