develooper Front page | perl.perl5.porters | Postings from November 2021

strict/warnings versioned bundles

Thread Next
Paul "LeoNerd" Evans
November 29, 2021 09:55
strict/warnings versioned bundles
Message ID:
Currently, a `use VERSION` declaration is equivalent to something like:

  use strict;
  use warnings;
  use feature ':VERSION';  # the major.minor parts at least

As part of the new `builtin` pragma, I think it would be nice to give
it version bundles, so that one day we could extend `use VERSION` to
having it automatically pull in a versioned builtin bundle as well; e.g.

  use v5.40;

could be equivalent to

  use strict;
  use warnings;
  use feature ':5.40';
  use builtin ':5.40';

At this point, I wonder if the and ought to
recognise version numbers as well, just to add the same mechanism to
all four, for consistency and future expansion.

That said, I'm not currently sure what such a version declaration would
actually mean for these modules; they don't currently change their
behaviour dependent on that version. But I think it might be nice to
account for some future time at which there might be new strict or
warnings flags that only get enabled at some version.

Paul "LeoNerd" Evans      |  |

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