From eb442ca6956fbe2f10c921a405ca7715c1e354e7 Mon Sep 17 00:00:00 2001 From: Evan Carroll Date: Tue, 4 Sep 2007 00:17:02 -0500 Subject: [PATCH] now works with strict/warnings enabled --- PSQL-Query/bin/psql-plus | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/PSQL-Query/bin/psql-plus b/PSQL-Query/bin/psql-plus index a5f1518..1a7a29a 100755 --- a/PSQL-Query/bin/psql-plus +++ b/PSQL-Query/bin/psql-plus @@ -1,4 +1,6 @@ #!/usr/bin/perl -l +use strict; +use warnings; use PSQL::Query::Handle; use IO::Handle; @@ -13,12 +15,13 @@ my $result = GetOptions ( $fmt_oppr = '%s' unless $fmt_oppr or $fmt_info; foreach ( $fmt_oppr, $fmt_info ) { + next unless defined; s/ \\n / \n /gxo; s/ \\t / \t /gxo; } -my $io = IO::Handle->new_from_fd( STDIN, "r" ); -$query = PSQL::Query::Handle->new({ handle => $io }); +my $io = IO::Handle->new_from_fd( 'STDIN', "r" ); +my $query = PSQL::Query::Handle->new({ handle => $io }); while ( my $row = $query->shift_row ) { -- 2.11.4.GIT