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

Hi monks,

You've a script that uses a number of CPAN modules. These modules are upgraded to run on perl6 while your script is still based on perl5. What's going to happen? Will your script break?

How about the other way round? Your script is upgraded to perl 6 but the modules are still based on perl 5.

Any idea?

Replies are listed 'Best First'.
Re: Perl 5 script using perl 6 module...
by dragonchild (Archbishop) on Apr 25, 2004 at 14:42 UTC
    Both questions have been addressed extensively and the short answer is that everything will "Just Work"TM. If you want more details, look through Apocalypses 3 and 12, and the Exgeses have info, as well.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

Re: Perl 5 script using perl 6 module...
by matija (Priest) on Apr 25, 2004 at 08:27 UTC
    While I'm not anywhere near the inner circles, I understand that Ponie will compile Perl5 into Parrot, just like the Perl 6 engine will compile Perl 6 into Parrot.

    Once they are both in Parrot, I suspect most stuff will just work - except for the modules which depend on Perl internals.

Re: Perl 5 script using perl 6 module...
by duff (Parson) on Apr 25, 2004 at 16:55 UTC
    A good question, but I prefer to wait until there's an actual implementation of perl6 before worrying about these things :-) As to what should happen, the answer has been and continues to be it should just work.
Re: Perl 5 script using perl 6 module...
by petdance (Parson) on Apr 25, 2004 at 17:54 UTC
    You have at least a year, probably two or more, before you'll have to deal with it. That's an eternity in code time.

    Carry on as if Perl 6 won't exist.

    xoxo,
    Andy

      You have at least a year, probably two or more

      The funny thing is, I've been saying this for the past 3 years. One of my buddies thinks it's hilarious that every time he asks how perl6 is coming, I always say "probably another year" with a vague wave of the hand. Not that it bothers me, as I'm pretty happy with perl5, but just trying to reinforce your point. I hope perl6 does eventually bear fruit, but I doubt it's going to happen any time soon. (I guess we could consider Parrot to be fruit already born, as well as some of the interesting ideas being rolled into perl5 modules. But you know what I mean.)

Re: Perl 5 script using perl 6 module...
by TomDLux (Vicar) on Apr 25, 2004 at 22:56 UTC

    If you focus on writing code that is clear, straightfoward, and in the Perl tradition, the odds are good that Perl6 will run it without change. Try to be tricky, and your tricks may be among those no longer supported.

    As a fringe benefit, your clear, readable code will be easier to re-inplement, should that become necessary, and will be easier to maintain for another ten years, should it continue to run.

    --
    TTTATCGGTCGTTATATAGATGTTTGCA

Re: Perl 5 script using perl 6 module...
by samtregar (Abbot) on Apr 26, 2004 at 02:25 UTC
    That's easy Chicken Little, the sky falls.

    -sam