On 4/26/2004 2:16 PM, Rod Adams wrote:

Larry Wall wrote:

In general it's probably a lousy idea to rely on #!/usr/bin/perl6 to
select language since you want the version number to select the
version of Parrot you're running, not the version of Perl.

One thing that occurred to me over the weekend is that we could fix all
the one-liners using a similar strategy to the package/module/class
switch.  It would be a (roughly) zero growth option to simply
switch to :x syntax for command-line switches instead of -x syntax.
Any program that uses colon switches instead of minus switches would
then automatically be assumed to be in Perl 6.

So maybe a minimal Perl 6 marker would be something like

   #!/usr/bin/perl :
   #!/usr/bin/perl ::
   #!/usr/bin/perl :6


ick



Uhm... What exactly is wrong with

#!/usr/bin/perl -M6

What is wrong with a pragma


use lang perl => 6;

where the version is optional? This will still work on the commandline:

perl -Mlang,perl,6 -e 'blah'

it will also work in a file to allow (possibly in the future) embedding other languages or parrot assembler. It's unambiguous. It could also allow hooks for Inline::* modules to be called in the same consistent way.

Randy.




Reply via email to