You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2014/08/19 02:46:14 UTC
[3/3] git commit: refs/heads/prep_0.4.0 - Prepare for removal of CGI
in Perl 5.22.
Prepare for removal of CGI in Perl 5.22.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/365ed37d
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/365ed37d
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/365ed37d
Branch: refs/heads/prep_0.4.0
Commit: 365ed37d40467a9e5f2f15ea9a1c8685be8acc24
Parents: cff3378
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Mon Aug 18 17:43:19 2014 -0700
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Mon Aug 18 17:45:37 2014 -0700
----------------------------------------------------------------------
perl/t/binding/702-sample.t | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/365ed37d/perl/t/binding/702-sample.t
----------------------------------------------------------------------
diff --git a/perl/t/binding/702-sample.t b/perl/t/binding/702-sample.t
index 6d1b1e3..eafbc54 100644
--- a/perl/t/binding/702-sample.t
+++ b/perl/t/binding/702-sample.t
@@ -16,7 +16,17 @@
use strict;
use warnings;
use lib 'buildlib';
-use Test::More tests => 1;
+use Test::More;
+BEGIN {
+ no warnings 'deprecated';
+ eval 'use CGI;';
+ if ($@) {
+ plan( skip_all => 'no CGI' );
+ }
+ else {
+ plan( tests => 1 );
+ }
+}
use File::Spec::Functions qw( catfile catdir );
use File::Path qw( rmtree );
@@ -39,6 +49,7 @@ for my $filename (qw( search.cgi indexer.pl )) {
or die "no match";
my $uscon_source = catdir(qw( sample us_constitution ));
$content =~ s/(uscon_source\s+=\s+).*?;/$1'$uscon_source';/;
+ $content =~ s/(^use warnings;\n)/$1no warnings 'deprecated';\n/m;
$content =~ s/^use/$use_dirs;\nuse/m;
open( $fh, '>', "_$filename" ) or die $!;
print $fh $content;