[DBD::Pg 2/2] Perl::Critic tweaks

dbdpg-commits-gENoVmVU/[email protected] Thu, 14 Nov 2013 09:54:38 -0500
Newsgroups gmane.comp.db.postgresql.dbdpg.cvs
Message-ID <[email protected]>
Committed by Greg Sabino Mullane <greg-O9fzpki4YnJWk0Htik3J/[email protected]>

Subject: [DBD::Pg 2/2] Perl::Critic tweaks

---
 .perlcriticrc | 2 +-
 t/00basic.t   | 2 +-
 t/04misc.t    | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/.perlcriticrc b/.perlcriticrc
index 44493b8..7795748 100644
--- a/.perlcriticrc
+++ b/.perlcriticrc
@@ -2,7 +2,7 @@ verbose = 9
 profile-strictness = quiet
 
 [Documentation::PodSpelling]
-stop_words = ActiveKids AutoCommit boolean Bunce CachedKids ChildHandles ChopBlanks CompatMode CursorName DBD DBI Datatype dbdpg dev enum ErrCount FetchHashKeyName HandleError HandleSetErr InactiveDestroy LongReadLen LongTruncOk Mergl Momjian Mullane NULLABLE OID ParamValues ParamTypes PgBouncer pgend pglibpq pglogin pgprefix pgquote pgstart PGSERVICE PGSYSCONFDIR perl Postgres PostgreSQL PrintError PrintWarn README RaiseError RowCache RowCacheSize RowsInCache SQL SQLSTATE SSL STDIN STDERR STDOUT Sabino Savepoints ShowErrorStatement TaintIn TaintOut TraceLevel UTF Username afterwards arrayrefs attr autocommit backend bitmask bytea cancelled datatype dbd dbh errstr fd filename getfd getline hashref largeobject len libpq lseg pgbuiltin pgsql runtime savepoint savepoints schemas sslmode tabl
 ename tablespace tablespaces tuple typename username varchar undef Perlish arrayref datatypes bool func PID dr ReadOnly nullable hashrefs DSN
+stop_words = ActiveKids AutoCommit boolean Bunce CachedKids ChildHandles ChopBlanks CompatMode CursorName DBD DBI Datatype dbdpg dev enum ErrCount FetchHashKeyName HandleError HandleSetErr InactiveDestroy LongReadLen LongTruncOk Mergl Momjian Mullane NULLABLE OID ParamValues ParamTypes PgBouncer pgend pglibpq pglogin pgprefix pgquote pgstart PGSERVICE PGSYSCONFDIR perl Postgres PostgreSQL PrintError PrintWarn README RaiseError RowCache RowCacheSize RowsInCache SQL SQLSTATE SSL STDIN STDERR STDOUT Sabino Savepoints ShowErrorStatement TaintIn TaintOut TraceLevel UTF Username afterwards arrayrefs attr autocommit backend bitmask bytea cancelled datatype dbd dbh errstr fd filename getfd getline hashref largeobject len libpq lseg pgbuiltin pgsql runtime savepoint savepoints schemas sslmode tabl
 ename tablespace tablespaces tuple typename username varchar undef Perlish arrayref datatypes bool func PID dr ReadOnly nullable hashrefs DSN onwards
 
 [-Bangs::ProhibitBitwiseOperators]
 [-Bangs::ProhibitCommentedOutCode]
diff --git a/t/00basic.t b/t/00basic.t
index 493f121..d86869e 100644
--- a/t/00basic.t
+++ b/t/00basic.t
@@ -22,7 +22,7 @@ BEGIN {
 		my $fh;
 		if (open $fh, '<', $file) {
 			{ local $/; $_ = <$fh>; }
-			close $fh;
+			close $fh or die qq{Could not close file "$file" $!\n};
 			for my $keyword (qw/ CCFLAGS INC LIBS /) {
 				if (/^#\s+$keyword => (.+)/m) {
 					diag "$keyword: $1";
diff --git a/t/04misc.t b/t/04misc.t
index 7e4e964..4fcff8e 100644
--- a/t/04misc.t
+++ b/t/04misc.t
@@ -109,7 +109,7 @@ $BC$
 		$@ and skip ('Cannot load function  for testing', 6);
 	}
 
-	my $sth = $dbh->prepare('SELECT * FROM dbdpg_test_error_handler( ? )');
+	$sth = $dbh->prepare('SELECT * FROM dbdpg_test_error_handler( ? )');
 
 	is( $sth->err, undef, q{Statement attribute 'err' is initially undef});
 
@@ -132,12 +132,12 @@ $BC$
 
 	for my $level (qw/normal/) {
 		$sth->execute($level);
-		is( $sth->err, undef, qq{Statement attribute 'err' set to undef when no notices raised});
+		is( $sth->err, undef, q{Statement attribute 'err' set to undef when no notices raised});
 	}
 
 	$sth->finish;
 
-	is( $sth->err, undef, qq{Statement attribute 'err' set to undef after statement finishes});
+	is( $sth->err, undef, q{Statement attribute 'err' set to undef after statement finishes});
 
 	$dbh->do('DROP FUNCTION dbdpg_test_error_handler(TEXT)') or die $dbh->errstr;
 	$dbh->do('SET client_min_messages = NOTICE');
@@ -466,7 +466,7 @@ $sth = $dbh->prepare('INSERT INTO tt VALUES (?,?)');
 
 $sth->bind_param(1, undef, $stt[0]); ## 4
 $sth->bind_param(2, undef, $stt[1]); ## 1 aka SQL_CHAR
-$sth->execute(2, "0301");
+$sth->execute(2, '0301');
 
 my $SQL = 'SELECT char4 FROM tt';
 my $result = $dbh->selectall_arrayref($SQL)->[0][0];
-- 
1.8.4