perl5 icon indicating copy to clipboard operation
perl5 copied to clipboard

Version tags for `use builtin :ver`

Open leonerd opened this issue 3 years ago • 4 comments

Supports the same syntax/semantics as use feature, in that

  • :major.minor accepted
  • :major.minor.patch accepted but patch number is ignored - anything goes

Not (yet) integrated into the main use VERSION syntax; but we can consider that in future.

leonerd avatar Dec 15 '21 15:12 leonerd

Like in feature.pm perhaps it would be best not to tie it to "all functions available in version X.Y" as there may be functions we want to remove or leave out for various reasons? And instead specify explicitly what is included in each bundle.

Grinnz avatar Dec 15 '21 16:12 Grinnz

Corollary: each builtin should document what version of Perl it was first available (or what version of builtin.pm, if it is ever dual-lifed)

Grinnz avatar Dec 15 '21 16:12 Grinnz

@Grinnz

it would be best not to tie it to "all functions available in version X.Y" as there may be functions we want to remove or leave out for various reasons

I've adjusted it so if since_ver is zero it won't include that function in a bundle. Likely we'll want to use this for some of the rarer functions later - getcwd possibly, also likely many of the other bits and pieces stolen from Internals, utf8, or other places.

each builtin should document what version of Perl it was first available

Docs added.

leonerd avatar Dec 15 '21 17:12 leonerd

I previously mentioned this on IRC, but if these functions are going to be marked as experimental, then they shouldn't be included in the version tag until they are considered stable.

haarg avatar Dec 25 '21 15:12 haarg

obsoleted by #21473 which was merged

tonycoz avatar Oct 05 '23 01:10 tonycoz