summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Util.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2016-02-29 19:34:34 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2016-02-29 19:34:34 +0100
commit86fb87f1a65a17e7a86fe71b06d57767b0b3ea3b (patch)
tree85acb4dc08ab6ff6247c2aafca88ac7bb3acd2e0 /Bugzilla/Util.pm
parent438d57d65626d068ca0f28de46410ebecc9a9b57 (diff)
downloadbugzilla-86fb87f1a65a17e7a86fe71b06d57767b0b3ea3b.tar.gz
bugzilla-86fb87f1a65a17e7a86fe71b06d57767b0b3ea3b.tar.xz
Bug 1136137: Require Perl 5.14
r=dkl
Diffstat (limited to 'Bugzilla/Util.pm')
-rw-r--r--Bugzilla/Util.pm10
1 files changed, 5 insertions, 5 deletions
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;