From a225e040f1d26055987becf1bc76af8d33f7a78d Mon Sep 17 00:00:00 2001 From: Zoffix Znet Date: Wed, 27 Sep 2017 17:50:31 +0000 Subject: [PATCH] Make &DEPRECATED treat $vfrom inclusively The error message says "since blah blah", so it implies the specified version is included. Also, making the version included in the commit message makes it easier to specify restrictions, especially when testing against the language version. --- src/core/Deprecations.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Deprecations.pm b/src/core/Deprecations.pm index 78af8929e29..8909a30b78a 100644 --- a/src/core/Deprecations.pm +++ b/src/core/Deprecations.pm @@ -59,7 +59,7 @@ sub DEPRECATED($alternative,$from?,$removed?,:$up = 1,:$what,:$file,:$line) { my Version $vremoved; if $from { $vfrom = Version.new($from); - return unless $version cmp $vfrom === More; + return if $version before $vfrom; # not deprecated yet } $vremoved = Version.new($removed) if $removed;