develooper Front page | perl.perl5.porters | Postings from July 2020

Re: Dual-life perl 5-or-7 code and prototypes - impossible?

Thread Previous | Thread Next
Todd Rinaldo
July 1, 2020 18:26
Re: Dual-life perl 5-or-7 code and prototypes - impossible?
Message ID:

> On Jul 1, 2020, at 7:57 AM, Paul LeoNerd Evans <> wrote:
> On Wed, 1 Jul 2020 07:31:42 -0500
> Todd Rinaldo <> wrote:
>> I agree that's probably the best way to go. It's a technical debt
>> that makes sense to put off for another day. The same goes for Test2
>> prototypes.
> Can we get you to say this again clearly, for the audience?

If you want me on record for something, I'll say I think dual life modules are a bad idea we had to do because perl 5 lasted so long. I'd rather we stop updating the CPAN version and keep what ships with Perl. I realize there are counter arguments to this and it's not the right time so ¯\_(ツ)_/¯ 

> Are you actually saying that every Perl 5 module should now be actively
> defending itself against a future Perl 7 from causing it breakage?

IMO a dual life (especially something in dist) should be written to work with the version in blead. The long tail of having to code down to the supporting a perl written 20 years ago is unsustainable. 

I would actually argue your statement is backward. We're not "defending against a future perl 7", we're "defending against a past perl 5".

> And it should be doing so by guessing that 'signatures' is the one and
> only feature that needs to be disabled?

It's not a guess right? you're using prototypes and the trick of rewriting the prototype means you can only be compatible back to perl 5.18. So we have to do this instead.

no if $] >= 7 feature 'signatures';

> Are you going to promise that there won't be any more features in the
> future that we'll also have to turn off?

I'm not promising anything. It is my hope that some day in the future, enough stuff moves off of 5 that the v5 protocol just gets dropped from support. Is that next year or next century? No idea. 

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