2 my $dbic_ver_re = qr/ 0 \. (\d{2}) (\d{2}) (\d{2}) (?: _ (\d{2}) )? /x; # not anchored!!!
4 my $version_string = Meta->version;
5 my $version_value = eval $version_string;
7 my ($v_maj, $v_min, $v_point, $v_dev) = $version_string =~ /^$dbic_ver_re$/
9 "Invalid version %s (as specified in %s)\nCurrently valid version formats are 0.MMVVPP or 0.MMVVPP_DD\n",
11 Meta->{values}{version_from} || Meta->{values}{all_from} || 'Makefile.PL',
16 die "Illegal version $version_string - we are still in the 0.08 cycle\n"
19 Meta->makemaker_args->{DISTVNAME} = Meta->name . "-$version_string-TRIAL" if (
20 # all odd releases *after* 0.089x generate a -TRIAL, no exceptions
25 my $tags = { map { chomp $_; $_ => 1} `git tag` };
26 # git may not be available
29 my $shipped_dev_versions;
31 my $legacy_re = qr/^ v 0 \. (\d{2}) (\d{2}) (\d) (?: _ (\d{2}) )? $/x;
34 if ($_ =~ /^v$dbic_ver_re$/ or $_ =~ $legacy_re ) {
36 $shipped_dev_versions->{"0.$1$2$3$4"} = 1;
39 $shipped_versions->{"0.$1$2$3"} = 1;
45 die sprintf "Tags in unknown format found: %s\n", join ', ', keys %$tags
49 # keep the Makefile.PL eval happy