Patrick R.Michaud (via RT) wrote:

Currently the most frequently asked question (by far) about perl6 is "how can I just get an executable that I can use to run Perl 6 programs?" At present this isn't possible, the best we can offer is "/path/to/parrot/parrot /path/to/parrot/languages/perl6/perl6.pbc hello.pl", which is a pain. So, we need a way to package this up into a simple shell script, executable, or other item that can be placed in a PATH and executed directly. Some ideas:

* automatically generate a perl6/perl6.bat shell script that hardcodes
  the paths

This is a good place to start to increase the perception of progress (it'll only take a minute or two).

* add some smarts to Parrot to allow it to search/execute .pbc files
  in some standard locations (RT#47992)

We certainly need to allow configurable search paths (at runtime and compile-time). And we certainly need to eliminate the requirement for passing full relative paths for everything.

There was an old proposal to do file-extension searches for all files, but the problem was that any automatic selection of extension turned out to be wrong about half-the-time. I don't consider the idea rejected for all time, but that particular implementation wasn't the right one.

Adding a --prog= (or --language= or --compiler=) option is an easy sell, at least in the context of loading a language compiler, and could do more than just selecting a .pbc file to run.

* convert perl6.pbc into a C executable

Possible, but ultimately too constraining. There are significant advantages to having the full Parrot runtime environment available.

* other...?

Busybox has a nice feature where it checks the name you used to call it, and presents different behavior based on that name. So, if 'ps' is a symlink to 'busybox', when you call 'ps' on the command-line, Busybox knows to process the options given as if it were the 'ps' command.

<http://www.ibm.com/developerworks/linux/library/l-busybox/>

Parrot can do something similar, checking the name used to call it. If 'perl6' is a symlink to 'parrot' and the user calls 'perl6 myscript.pl' Parrot can simply act as if the --language=perl6 option was passed on the command-line.


The goal is to have the 'parrot' part be invisible, so an embedded system or install CD can present the illusion of running Python, PHP, Perl 5, Perl 6, etc, but actually be running only Parrot.

Allison

Reply via email to