Luke Palmer <[EMAIL PROTECTED]> writes:

> David Cantrell writes:
>> A few days ago I briefly discussed with Nicholas Clark (current perl 5.8
>> pumpking) about making perl5 code forward-compatible with perl6.  A
>> quick look through the mailing list archives didn't turn up anything
>> obvious, and I don't recall any mechanism being presented in any of the
>> Apocalypses, so ...
>
> Well, there is one, as far as I understand it.  Your "use perl5;" is
> spelled "package".  That is, perl will assume Perl 6 unless it sees
> "package SomethingOrOther;" (since Perl 6 calls them "module"s).  So, to
> force Perl 5 interpretation, use:

I thought that the rule was .pm files were deemed to be Perl 6 unless
they began with 'package', but that anything else was deemed to be Perl
5 unless it began with 'module main'. That way legacy scripts will run
happily and perl 6 scripts can either use a perl6 shebang or start with
'module main'. 

-- 
Beware the Perl 6 early morning joggers -- Allison Randal

Reply via email to