develooper Front page | perl.perl6.compiler | Postings from May 2005

Re: How to compile to PIR or byte codes

Thread Previous
Autrijus Tang
May 20, 2005 09:05
Re: How to compile to PIR or byte codes
Message ID:
On Fri, May 20, 2005 at 03:13:52PM +0100, Colin Paul Adams wrote:
> I am trying to work out how to compile a perl script using pugs.
> (Am I on the right mailing list?)

Well, yes and no.  To run Perl 5 in Parrot, you want the ponie-dev
mailing list -- this is perl6-compiler after all. :-)

> If I do pugs -h, then it suggests to me the -C option will do the
> trick, but does not say what value the backend might be.

Thanks, the latest trunk now suggests ays:

    -Cbackend        compile using the compiler backend
		    (valid backends are: Pugs, Parrot, Haskell

> so it seems to dislike the for, but I guess it's something that comes
> before that. Is there a list of incompatibilites with perl 5 anywhere?
> (I might add that I know very little at all about perl).

The short answer is that Perl6->Parrot codegen is currently very
primitive in Pugs; I expect to improve it next month with Leo and Chip,
but currently it's not robust at all.

However, for some (minimal) success in embedding Perl 6 via Parrot, see
mod_parrot, which has a mod_pugs layer:

The long answer is that, in general, Perl 5 script will not run as Perl 6
without some conversion.  The definitive documents about Perl 6 is the

There are various quick-references in the Pugs tree, assuming you know
some Perl 5:

There is also a Perl 5 to Perl 6 "porting guide":

Larry is working on a translator that can compile Perl 5 program into
Perl 6, known as PPD, but it's not released yet.  Nicholas Clark is heading
an effort to run Perl 5 on top of Parrot VM, known as Ponie:


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About