On Jan 21, 2016, at 2:36 AM, Steve Mynott <steve.myn...@gmail.com> wrote:

> On 21 January 2016 at 01:40, Darren Duncan <dar...@darrenduncan.net> wrote:
>> On 2016-01-20 5:02 PM, ToddAndMargo wrote:
>>> or is it all by hand?
>> If you mean a source code translator, I don't know of one right now but I
>> wouldn't be surprised if one exists, that at least handles a common subset
>> of Perl 5 code.  I expect having one will be a priority if it isn't around
>> now.
> There are at least two source code translators in progress:
> http://search.cpan.org/dist/Perl-ToPerl6/
> https://github.com/Util/Blue_Tiger/
> They probably help but I'd be surprised if they work particularly well
> yet in producing code which runs straight off.

I am the author of one of the translators (Blue Tiger),
and I welcome feedback on which parts are missing that
would (be|have been) useful to you; it will help me prioritize development.

For automated translation, see 
   Blue Tiger (p526) and Perl-ToPerl6 (perlmogrify) are the most useable.
   Perlito's website is down.

( For manual translation, read all of the 5to6-* docs at the top of 
http://docs.perl6.org/language.html , or email me ).

Below, I have a terminal log of installation and execution of both translators.

$ cat >example.pl <<END
#!/usr/bin/env perl
use strict;
use warnings;

my @aaa = qw( a b c d e f g );

for my $c (@aaa) {
   print "$c$c$c\n";

$ cpanm Perl::ToPerl6
$ perlmogrify example.pl
$ cat example.pl.pl6
#!/usr/bin/env perl

my @aaa = qw ( a b c d e f g );

for (@aaa) -> $c {

$ git clone git://github.com/Util/Blue_Tiger.git
$ cd Blue_Tiger
$ bin/p526 ../example.pl

my @aaa = < a b c d e f g >;

for @aaa <-> $c {
   print "$c$c$c\n";

Hope this helps,
Bruce Gray (Util on IRC)

Reply via email to