From 86fb87f1a65a17e7a86fe71b06d57767b0b3ea3b Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Mon, 29 Feb 2016 19:34:34 +0100 Subject: Bug 1136137: Require Perl 5.14 r=dkl --- Bugzilla/Util.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Bugzilla/Util.pm') diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index 4718efc88..e030ff8a8 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -7,7 +7,7 @@ package Bugzilla::Util; -use 5.10.1; +use 5.14.0; use strict; use warnings; @@ -49,13 +49,13 @@ sub trick_taint { } sub detaint_natural { - my $match = $_[0] =~ /^(\d+)$/; + my $match = $_[0] =~ /^(\d+)$/a; $_[0] = $match ? int($1) : undef; return (defined($_[0])); } sub detaint_signed { - my $match = $_[0] =~ /^([-+]?\d+)$/; + my $match = $_[0] =~ /^([-+]?\d+)$/a; # The "int()" call removes any leading plus sign. $_[0] = $match ? int($1) : undef; return (defined($_[0])); @@ -723,8 +723,8 @@ sub validate_date { if ($ts) { $date2 = time2str("%Y-%m-%d", $ts); - $date =~ s/(\d+)-0*(\d+?)-0*(\d+?)/$1-$2-$3/; - $date2 =~ s/(\d+)-0*(\d+?)-0*(\d+?)/$1-$2-$3/; + $date =~ s/(\d+)-0*(\d+?)-0*(\d+?)/$1-$2-$3/a; + $date2 =~ s/(\d+)-0*(\d+?)-0*(\d+?)/$1-$2-$3/a; } my $ret = ($ts && $date eq $date2); return $ret ? 1 : 0; -- cgit v1.2.3-24-g4f1b