Front page | perl.perl5.porters |
Postings from September 2010
From: Brad Gilbert
September 1, 2010 08:55
Message ID: AANLkTinHpG-uyu9aKnqEXJe+Yx+qdr=9zeEQAxJsHZWb@mail.gmail.com
On Mon, Aug 30, 2010 at 5:09 AM, Ben Morrow <firstname.lastname@example.org> wrote:
> Quoth email@example.com (demerphq):
>> Show me how you would provide a backwards compatibility layer for a
>> feature, and show me how code would be written so it worked fine in a
>> new perl and an old perl.
> I would say: feature should be dual-life. If I say
> use feature ":5.12";
> feature.pm will attempt to emulate the features of 5.12 as far as
> possible on the perl it's running on. In a case like this, where we are
> talking about adding a keyword we already have an XS implementation for,
> that's easy.
Yeah I don't know why you couldn't have a copy of feature on CPAN that
will emulate say ( for example ) when it is used on a version of Perl
older than 5.10 (5.9.?)
It would probably require a fair bit of XS code, but I think it is doable.