1231231
Signed-off-by: hongjinghao <hongjinghao@huawei.com>
This commit is contained in:
parent
3d3276b58e
commit
90cf507065
31
backport-Simplify-the-upgrade-to-next-stable-logic.patch
Normal file
31
backport-Simplify-the-upgrade-to-next-stable-logic.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 33e0c0e1de3fdecb4a627eaa1662871e13e041d2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Leon Timmermans <fawaka@gmail.com>
|
||||||
|
Date: Fri, 4 Feb 2022 13:29:58 +0100
|
||||||
|
Subject: [PATCH] Simplify the upgrade-to-next-stable logic
|
||||||
|
|
||||||
|
---
|
||||||
|
lib/experimental.pm | 8 ++------
|
||||||
|
1 file changed, 2 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/experimental.pm b/lib/experimental.pm
|
||||||
|
index 41b3994..9fa4461 100644
|
||||||
|
--- a/lib/experimental.pm
|
||||||
|
+++ b/lib/experimental.pm
|
||||||
|
@@ -72,12 +72,8 @@ sub _enable {
|
||||||
|
croak "Can't enable unknown feature $pragma";
|
||||||
|
}
|
||||||
|
elsif ($] < $min_version{$pragma}) {
|
||||||
|
- my $stable = $min_version{$pragma};
|
||||||
|
- if ($stable->{version}[1] % 2) {
|
||||||
|
- $stable = version->new(
|
||||||
|
- "5.".($stable->{version}[1]+1).'.0'
|
||||||
|
- );
|
||||||
|
- }
|
||||||
|
+ my $stable = $min_version{$pragma}->stringify;
|
||||||
|
+ $stable =~ s/^ 5\. ([0-9]?[13579]) \. \d+ $/"5." . ($1 + 1) . ".0"/xe;
|
||||||
|
croak "Need perl $stable or later for feature $pragma";
|
||||||
|
}
|
||||||
|
elsif ($] >= ($removed_in_version{$pragma} || 7)) {
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user