develooper Front page | perl.perl5.porters | Postings from January 2022

Re: PSC #049 2022-01-07

Thread Previous | Thread Next
Tony Cook
January 10, 2022 23:09
Re: PSC #049 2022-01-07
Message ID:
On Mon, Jan 10, 2022 at 03:44:52AM -0800, Darren Duncan wrote:
> When a file says "use v5.36" or a higher version, it causes signatures to be
> available non-experimentally AND it causes @_ to not be declared within the
> scope of any sub using a signature, wherein any references to @_ will fail

This isn't practical with the way features work.

When you:

  use v5.36;

the hints word is updated with the number of the bundle of features
for that version.

Now just that could work, the code could check for that specific
feature bundle number, *but* if the code then enables or disables any
feature, then the bundle number is set to the "custom" bundle, and
features are stored in %^H (and mirrored in cop_features for
performance), and the feature bundle number check will no longer work.

So for this to work, we'd need a separate signatures
(eg. "signatures36") bundle with the new behaviour, if the user wanted
to disable signatures for a brief section of code, eg if they want to
define several prototyped functions, they'd neeed to C<no feature

So it gets ugly.


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