James A Duncan wrote in perl.perl6.internals : > > I've started work on B::Parrot, which is a Perl 5 to Parrot translation > engine. Its very basic at the moment, but I've got it successfully > translating things like: > > my $perliv = 10; > my $perlpv = "\n"; > print $perliv; > print $perlpv; > > into working, assemble-able parrot code. Before I go any further on > this crack-fuelled project is there anything I should be aware of? Are > others working on this? Have I done far too much crack smoking to > consider doing something like this now?
I think you're already aware of the main issue : the compiler backends are executed after compilation of the Perl 5 program. Thus, things that happen at compile-time (BEGIN and CHECK blocks, hints to the compiler via pragmas and the $^H / %^H variables) are difficult (or impossible) to spot correctly. The best (safest) method to port Perl 5 to Perl 6 would be IHMO to reimplement a full-blown Perl 5 parser to generate Parrot code. However this doesn't exclude the interest of your B::Parrot approach. Do you plan to release it on CPAN ? Oh, and don't forget to test it with and without threads. Look at the existing B:: modules for hints. -- Rafael Garcia-Suarez : http://rgarciasuarez.free.fr/ It's not a can of worms, it's a tank of shai-hulud. -- Jarkko Hietaniemi