Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Configure
Original file line number Diff line number Diff line change
Expand Up @@ -7120,16 +7120,16 @@ $echo "(You have $package $version_patchlevel_string.)"
case "$osname" in
dos|vms)
: XXX Should be a Configure test for double-dots in filenames.
version=`echo $revision $patchlevel $subversion | \
$awk '{ printf "%d_%d_%d", $1, $2, $3 }'`
api_versionstring=`echo $api_revision $api_version $api_subversion | \
$awk '{ printf "%d_%d_%d", $1, $2, $3 }'`
version=`echo $patchlevel $subversion | \
$awk '{ printf "%d_%d", $1, $2 }'`
api_versionstring=`echo $api_version $api_subversion | \
$awk '{ printf "%d_%d", $1, $2 }'`
;;
*)
version=`echo $revision $patchlevel $subversion | \
$awk '{ printf "%d.%d.%d", $1, $2, $3 }'`
version=`echo $patchlevel $subversion | \
$awk '{ printf "%d.%d", $1, $2 }'`
api_versionstring=`echo $api_revision $api_version $api_subversion | \
$awk '{ printf "%d.%d.%d", $1, $2, $3 }'`
$awk '{ printf "%d.%d", $1, $2 }'`
;;
esac
: Special case the 5.005_xx maintenance series, which used 5.005
Expand Down
3 changes: 1 addition & 2 deletions Porting/makerel
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,10 @@ my @patchlevel_h = <PATCHLEVEL>;
close PATCHLEVEL;
my $patchlevel_h = join "", grep { /^#\s*define/ } @patchlevel_h;
print $patchlevel_h;
my $revision = $1 if $patchlevel_h =~ /PERL_REVISION\s+(\d+)/;
my $patchlevel = $1 if $patchlevel_h =~ /PERL_VERSION\s+(\d+)/;
my $subversion = $1 if $patchlevel_h =~ /PERL_SUBVERSION\s+(\d+)/;
die "Unable to parse patchlevel.h" unless $subversion >= 0;
my $vers = sprintf("%d.%d.%d", $revision, $patchlevel, $subversion);
my $vers = sprintf("%d.%d", $patchlevel, $subversion);

# fetch list of local patches
my (@local_patches, @lpatch_tags, $lpatch_tags);
Expand Down
4 changes: 2 additions & 2 deletions cpan/CPAN-Meta-Requirements/t/from-hash.t
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ for my $string (10, '>= 2, <= 9, != 7') {

SKIP: {
skip "Can't tell v-strings from strings until 5.8.1", 1
unless $] gt '5.008';
unless "$]" > 5.008;
my $string_hash = {
Left => 10,
Shared => '= 2',
Expand Down Expand Up @@ -87,7 +87,7 @@ SKIP: {

SKIP: {
skip "Can't tell v-strings from strings until 5.8.1", 2
unless $] gt '5.008';
unless "$]" > 5.008;
my $string_hash = {
Left => 10,
Shared => v50.44.60,
Expand Down
2 changes: 1 addition & 1 deletion cpan/CPAN-Meta/lib/CPAN/Meta.pm
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ sub save {
my ($self, $file, $options) = @_;

my $version = $options->{version} || '2';
my $layer = $] ge '5.008001' ? ':utf8' : '';
my $layer = "$]" >= 5.008001 ? ':utf8' : '';

if ( $version ge '2' ) {
carp "'$file' should end in '.json'"
Expand Down
10 changes: 5 additions & 5 deletions cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ sub _prepare_headers_and_cb {
}
elsif ( length $args->{content} ) {
my $content = $args->{content};
if ( $] ge '5.008' ) {
if ( "$]" >= 5.008 ) {
utf8::downgrade($content, 1)
or die(qq/Wide character in request message body\n/);
}
Expand Down Expand Up @@ -1032,7 +1032,7 @@ my $unsafe_char = qr/[^A-Za-z0-9\-\._~]/;
sub _uri_escape {
my ($self, $str) = @_;
return "" if !defined $str;
if ( $] ge '5.008' ) {
if ( "$]" >= 5.008 ) {
utf8::encode($str);
}
else {
Expand Down Expand Up @@ -1189,7 +1189,7 @@ sub write {
@_ == 2 || die(q/Usage: $handle->write(buf)/ . "\n");
my ($self, $buf) = @_;

if ( $] ge '5.008' ) {
if ( "$]" >= 5.008 ) {
utf8::downgrade($buf, 1)
or die(qq/Wide character in write()\n/);
}
Expand Down Expand Up @@ -1474,7 +1474,7 @@ sub write_content_body {
defined $data && length $data
or last;

if ( $] ge '5.008' ) {
if ( "$]" >= 5.008 ) {
utf8::downgrade($data, 1)
or die(qq/Wide character in write_content()\n/);
}
Expand Down Expand Up @@ -1521,7 +1521,7 @@ sub write_chunked_body {
defined $data && length $data
or last;

if ( $] ge '5.008' ) {
if ( "$]" >= 5.008 ) {
utf8::downgrade($data, 1)
or die(qq/Wide character in write_chunked_body()\n/);
}
Expand Down
2 changes: 1 addition & 1 deletion cpan/version/t/coretests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ SKIP: {

SKIP: {
skip 'Cannot test bare alpha v-strings with Perl < 5.8.1', 2
if $] lt 5.008_001;
if "$]" < 5.008_001;
$version = $CLASS->$method(v1.2.3_4);
$DB::single = 1;
is($version, "v1.2.34", '"$version" eq "v1.2.34"');
Expand Down
16 changes: 8 additions & 8 deletions dist/Module-CoreList/lib/Module/CoreList.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sub _looks_like_invocant ($) { local $@; !!eval { $_[0]->isa(__PACKAGE__) } }
sub _undelta {
my ($delta) = @_;
my (%expanded, $delta_from, $base, $changed, $removed);
for my $v (sort keys %$delta) {
for my $v (sort { $a <=> $b } keys %$delta) {
($delta_from, $changed, $removed) = @{$delta->{$v}}{qw( delta_from changed removed )};
$base = $delta_from ? $expanded{$delta_from} : {};
my %full = ( %$base, %{$changed || {}} );
Expand Down Expand Up @@ -54,7 +54,7 @@ sub first_release_raw {

my @perls = $version
? grep { defined $version{$_}{ $module } &&
$version{$_}{ $module } ge $version } keys %version
$version{$_}{ $module } >= $version } keys %version
: grep { exists $version{$_}{ $module } } keys %version;

return @perls;
Expand All @@ -69,7 +69,7 @@ sub first_release_by_date {
sub first_release {
my @perls = &first_release_raw;
return unless @perls;
return (sort { $a cmp $b } @perls)[0];
return (sort { $a <=> $b } @perls)[0];
}

sub find_modules {
Expand Down Expand Up @@ -123,9 +123,9 @@ sub removed_from_by_date {
sub removed_raw {
shift if defined $_[1] and $_[1] =~ PKG_PATTERN and _looks_like_invocant $_[0];
my $mod = shift;
return unless my @perls = sort { $a cmp $b } first_release_raw($mod);
return unless my @perls = sort { $a <=> $b } first_release_raw($mod);
my $last = pop @perls;
my @removed = grep { $_ > $last } sort { $a cmp $b } keys %version;
my @removed = grep { $_ > $last } sort { $a <=> $b } keys %version;
return @removed;
}

Expand Down Expand Up @@ -449,11 +449,11 @@ sub changes_between {
5.043002 => '2025-08-20',
5.043003 => '2025-09-23',
5.043004 => '2025-10-22',
5.043005 => '2025-11-20',
43.005 => '2025-11-20',
);

for my $version ( sort { $a <=> $b } keys %released ) {
my $family = int ($version * 1000) / 1000;
my $family = $version > 43 ? int($version) : int( $version * 1000 ) / 1000;
push @{ $families{ $family }} , $version;
}

Expand Down Expand Up @@ -23899,7 +23899,7 @@ for my $version ( sort { $a <=> $b } keys %released ) {
removed => {
}
},
5.043005 => {
43.005 => {
delta_from => 5.043004,
changed => {
'B::Op_private' => '5.043005',
Expand Down
10 changes: 5 additions & 5 deletions dist/Module-CoreList/lib/Module/CoreList/Utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ sub first_release_raw {

my @perls = $version
? grep { exists $utilities{$_}{ $util } &&
$utilities{$_}{ $util } ge $version } keys %utilities
$utilities{$_}{ $util } >= $version } keys %utilities
: grep { exists $utilities{$_}{ $util } } keys %utilities;

return grep { exists $Module::CoreList::released{$_} } @perls;
Expand All @@ -47,7 +47,7 @@ sub first_release_by_date {
sub first_release {
my @perls = &first_release_raw;
return unless @perls;
return (sort { $a cmp $b } @perls)[0];
return (sort { $a <=> $b } @perls)[0];
}

sub removed_from {
Expand All @@ -63,10 +63,10 @@ sub removed_from_by_date {
sub removed_raw {
my $util = shift;
$util = shift if eval { $util->isa(__PACKAGE__) };
return unless my @perls = sort { $a cmp $b } first_release_raw($util);
return unless my @perls = sort { $a <=> $b } first_release_raw($util);
@perls = grep { exists $Module::CoreList::released{$_} } @perls;
my $last = pop @perls;
my @removed = grep { $_ > $last } sort { $a cmp $b } keys %utilities;
my @removed = grep { $_ > $last } sort { $a <=> $b } keys %utilities;
return @removed;
}

Expand Down Expand Up @@ -2203,7 +2203,7 @@ my %delta = (
removed => {
}
},
5.043005 => {
43.005 => {
delta_from => 5.043004,
changed => {
},
Expand Down
2 changes: 1 addition & 1 deletion ext/XS-APItest/t/xsub_h.t
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ foreach $XS_VERSION (undef, @versions) {
is_deeply([XS_APIVERSION_valid("Pie")], [], "XS_APIVERSION_BOOTCHECK passes");
is(eval {XS_APIVERSION_invalid("Pie"); 1}, undef,
"XS_APIVERSION_BOOTCHECK croaks for an invalid version");
like($@, qr/Perl API version v1.0.16 of Pie does not match v5\.\d+\.\d+/,
like($@, qr/Perl API version v1.0.16 of Pie does not match v(?:5\.\d+\.\d+|\d+\.\d+) /,
"expected error");

my @xsreturn;
Expand Down
5 changes: 3 additions & 2 deletions lib/B/Deparse-core.t
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ use warnings;
use strict;
use Test::More;

use feature (sprintf(":%vd", $^V)); # to avoid relying on the feature
# logic to add CORE::
# to avoid relying on the feature logic to add CORE::
use feature (sprintf(":%s", $^V =~ /^v(5\.\d+|\d+)/g));

use B::Deparse;
my $deparse = B::Deparse->new();

Expand Down
4 changes: 2 additions & 2 deletions lib/B/Deparse.t
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,7 @@ CORE::evalbytes '';
####
# feature features when feature has been disabled by use VERSION
# CONTEXT no warnings 'deprecated';
use feature (sprintf(":%vd", $^V));
use feature (sprintf(":%s", $^V =~ /^v(5\.\d+|\d+)/g));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be needed. feature.pm is meant to accept the full version as a bundle, and will shorten it as needed. If it isn't doing that correctly, it should be fixed.

use 1;
CORE::say $_;
CORE::state $x;
Expand Down Expand Up @@ -1775,7 +1775,7 @@ CORE::evalbytes '';
# (the above test with CONTEXT, and the output is equivalent but different)
# CONTEXT use feature ':5.10'; no warnings 'deprecated';
# feature features when feature has been disabled by use VERSION
use feature (sprintf(":%vd", $^V));
use feature (sprintf(":%s", $^V =~ /^v(5\.\d+|\d+)/g));
use 1;
CORE::say $_;
CORE::state $x;
Expand Down
2 changes: 1 addition & 1 deletion lib/B/Op_private.pm

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions lib/feature.pm

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/perl5db.pl
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ package DB;

BEGIN {
require feature;
$^V =~ /^v(\d+\.\d+)/;
$^V =~ /^v(5\.\d+|\d+)/;
feature->import(":$1");
$_initial_cwd = Cwd::getcwd();
}
Expand Down
2 changes: 1 addition & 1 deletion myconfig.SH
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $startsh

# Note that the text lines /^Summary of/ .. /^\s*$/ are copied into Config.pm.
cat <<'!NO!SUBS!'
Summary of my $package (revision $revision $version_patchlevel_string) configuration:
Summary of my $package ($version_patchlevel_string) configuration:
$git_commit_id_title $git_commit_id$git_ancestor_line
Platform:
osname=$osname
Expand Down
2 changes: 1 addition & 1 deletion op.c
Original file line number Diff line number Diff line change
Expand Up @@ -8440,7 +8440,7 @@ Perl_utilize(pTHX_ int aver, I32 floor, OP *version, OP *idop, OP *arg)
}
else {
/* OK let's at least warn */
deprecate_fatal_in(WARN_DEPRECATED__SUBSEQUENT_USE_VERSION, "5.44",
deprecate_fatal_in(WARN_DEPRECATED__SUBSEQUENT_USE_VERSION, "44",
"Changing use VERSION while another use VERSION is in scope");
}
}
Expand Down
5 changes: 2 additions & 3 deletions perl.c
Original file line number Diff line number Diff line change
Expand Up @@ -4011,9 +4011,8 @@ S_minus_v(pTHX)
#endif /* #ifdef PERL_PATCHNUM */
PIO_stdout = PerlIO_stdout();
PerlIO_printf(PIO_stdout,
"\nThis is perl " STRINGIFY(PERL_REVISION)
", version " STRINGIFY(PERL_VERSION)
", subversion " STRINGIFY(PERL_SUBVERSION)
"\nThis is perl, version " STRINGIFY(PERL_VERSION)
", subversion " STRINGIFY(PERL_SUBVERSION)
" (%" SVf ") built for " ARCHNAME, SVfARG(level)
);
SvREFCNT_dec_NN(level);
Expand Down
8 changes: 3 additions & 5 deletions perl.h
Original file line number Diff line number Diff line change
Expand Up @@ -5415,12 +5415,10 @@ EXTERN_C char **environ; /* environment variables supplied via exec */
#include "patchlevel.h"
#undef PERL_PATCHLEVEL_H_IMPLICIT

#define PERL_VERSION_STRING STRINGIFY(PERL_REVISION) "." \
STRINGIFY(PERL_VERSION) "." \
STRINGIFY(PERL_SUBVERSION)
#define PERL_VERSION_STRING STRINGIFY(PERL_VERSION) "." \
STRINGIFY(PERL_SUBVERSION) ".0"

#define PERL_API_VERSION_STRING STRINGIFY(PERL_API_REVISION) "." \
STRINGIFY(PERL_API_VERSION) "." \
#define PERL_API_VERSION_STRING STRINGIFY(PERL_API_VERSION) "." \
STRINGIFY(PERL_API_SUBVERSION)

START_EXTERN_C
Expand Down
Loading
Loading