Skip to content

Instantly share code, notes, and snippets.

@happy-barney
Last active September 23, 2018 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save happy-barney/b92755cce092a138cb40a084391f5897 to your computer and use it in GitHub Desktop.
Save happy-barney/b92755cce092a138cb40a084391f5897 to your computer and use it in GitHub Desktop.
perl5 versioning change proposal

Proposal

Let's start to use year as version, eg:

bash$ perl -Mv5.2018
Perl v5.2018.0 required--this is only v5.6.2, stopped.
BEGIN failed--compilation aborted.

Motivation

  • signal users that perl5 is still alive and up-to-date :-)
  • (just guessing) customers / managers may easier understand why they should approve upgrade

Affected use cases

$]

Switch from 3+3 to 4+3 (eg: 5.2018001). Numerical comparison will still work though some pretty prints may by broken.

use VERSION

Even v5.6.2 reports required version properly

bash$ perl -Mv5.2018
Perl v5.2018.0 required--this is only v5.6.2, stopped.
BEGIN failed--compilation aborted.

Usage without vstring will need tuning

bash$ perl -M5.2018
Perl v5.201.800 required--this is only v5.6.2, stopped.

use VERSION should enforce vstring, for example it should be syntax error if number higher than last version before this change will be adopted is used

ExtUtils::MakeMaker

MIN_PERL_VERSION => 5.026

bash$ perl Makefile.PL 
Warning: Perl version 5.026 or higher required. We run 5.016003.

MIN_PERL_VERSION => 5.2018

bash$ perl Makefile.PL 
Warning: Perl version 5.2018 or higher required. We run 5.016003.

Module::Builder

requires => { perl => "5.26" }

bash$ perl Build.PL 
Checking prerequisites...
  requires:
    !  perl (5.16.3) is installed, but we need version >= 5.26

requires => { perl => "5.2018" }

bash$ perl Build.PL 
Checking prerequisites...
  requires:
    !  perl (5.16.3) is installed, but we need version >= 5.2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment