Open opendevnet opened 8 years ago
Thanks for this. Perl has subroutine signatures built in from version 5.20 upwards. What if we changed this to a conditional test that used native signatures and only ran if the Perl version was high enough?
I think the point is to make sure there is no incompatibility between Function::Parameter’s own prototype handling and Sub::Attributes. When perl’s built-in subroutine signatures are used, perl’s own prototype handling code still continues to be used, so those code paths are already tested elsewhere. But Function::Parameters has to _re_implement what perl already does, because of the way it is written. So testing with Function::Parameters makes sense, but the test should be skipped if Function::Parameters is installed.
(Does anything I wrote make any sense?)
or, even better: the test should be skipped if Function::Parameters
is not installed. :-)
Er, yeah, that’s what I meant. :-)
There are a lot of signatures modules. My favorite was Method::Signatures
, for example. Why would we include a compatibility test for this particular signatures modules in Subroutine::Attributes
?
It doesn't break anything, and it's always nice when things work with
Function::Parameters
:-)Inspired by Schwern and other responses to this Stack Overflow query: