kiat has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks,

Greetings :)

I became rather "unsettled" after reading Apocalypse 5. While I look foward to an ever more power Perl when Perl 6 is completed, my impression after the reading is the changes are going to be quite involved.

The task of modifying perl5 code to work in Perl 6 doesn't appeal to me at all. I was wondering whether there would be a sort of convert-to-perl6 utility that will do the conversion automatically.

I know it's really too early to ask but I would like to hear from anybody who can offer some advice on this.

cheers,

kiat

Edit kudra, 2002-06-08 Changed title

Replies are listed 'Best First'.
Re: Perl 6
by Elian (Parson) on Jun 08, 2002 at 04:53 UTC
    Couple of points:
    1. While morphing perl optrees is a pain, it's definitely doable--it's what B::Deparse does. If we can translate Python bytecode to run on Perl 5's engine, translating most perl 5 to run on Parrot isn't a big deal
    2. There'll be a perl 5 compatible version of the regex engine, to make that transition easier.
    3. You're not under any obligation to move anything to perl 6. Perl 5's not going to drop over dead just because we release perl 6

    Larry's promised a translator from perl 5 to perl 6 that'll handle most things. I've promised it too, and you'll get it if I have to embed perl 5 inside a perl 6 extension somehow.

    (I've also promised a perl 5 parser for parrot, but people seem to enjoy heaping scorn on that idea, the silly twits, so we'll leave that one off for now)

      There'll be a perl 5 compatible version of the regex engine, to make that transition easier.
      will this be built-in, or a core module... or what? i'm reading conflicting info about the size and shape of the perl 6 core, and i want to get a better understanding about what will be inside.... that is, if any of that's been decided yet.

      (I've also promised a perl 5 parser for parrot, but people seem to enjoy heaping scorn on that idea, the silly twits, so we'll leave that one off for now)
      i love this idea. not only does it help decouple parrot's release from perl 6, but it gives me a chance to move my perl 5 programs to parrot without moving them to perl 6. if the risk of conversion to the parrot interpreter is less than that of perl 6 conversion, it will greatly ease the transition to an all perl 6 runtime.

      ~Particle *accelerates*

        Depends on what you mean by "built in" or "core module". It'll ship as part of the standard Parrot distribution since so many languages that do regexes do perl 5 compatible ones, so it seems foolish to have three or four different perl 5 regex compilers. It'll be an add-on parser module, probably loaded on demand. (Though you won't have to have a use perl5 qw(re); in your program anywhere) If it's small enough, it might just get yanked in unconditionally.
      Thanks, Elian! That was reassuring and I think I'll be able to sleep better tonight. *gg

      kiat
Re: Perl 6
by elusion (Curate) on Jun 08, 2002 at 02:56 UTC
Re: Perl 5 to Perl 6 code conversion
by cLive ;-) (Prior) on Jun 08, 2002 at 14:22 UTC
    FAQ here

    "Larry has mumbled something about a package statement declaring that the file is Perl 5, but we're still not quite sure on how that fits in."

    cLive ;-)

    --
    seek(JOB,$$LA,0);

      Hi cLive ;-)

      The FAQ pointed out by you was really helpful - I had read about Parrot but never quite knew what it was. The FAQ answers a lot of questions that I've been asking myself about Parrot as well as about how Perl 6 will be different from the Perl I know.

      cheers,

      kiat
        my $user = "test";