There's also no if $] >= 7 feature 'signatures'; 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. Todd > On Jun 30, 2020, at 2:56 PM, Kent Fredric <kentfredric@gmail.com> wrote: > > On Sat, 27 Jun 2020 at 23:45, Paul "LeoNerd" Evans > <leonerd@leonerd.org.uk> wrote: >> >> TL;DR: I believe it impossible to write a dual-life module using >> function prototypes that works on both perl 5 and perl 7. > > There may be an easier, and inherently more portable and compatible > option, assuming of course, perl7 never deprecates the ability to `no > feature qw(signatures)` > > ( in say, List::Utils ) > > BEGIN { > if ( $] >= 7) { > require feature; > feature->unimport('signatures'); > } > } > > I've synthetically demonstrated this currently works on perl5. > > https://gist.github.com/kentfredric/875a5d2f9d56a7438669cbabfdc3b885 > > Surely I must have missed something obvious.Thread Previous | Thread Next