On Thu, Feb 9, 2012 at 11:30, Tom Lane <[email protected]> wrote:
> Alvaro Herrera <[email protected]> writes:
>> Excerpts from Tom Lane's message of jue feb 09 12:17:59 -0300 2012:
>> FWIW that script is throwing a warning here:
>> Use of assignment to $[ is deprecated at
>> /pgsql/source/HEAD/src/tools/check_keywords.pl line 19.
>
> Any Perl hackers want to improve that script?
The attached 2 liner does it for me.
*** a/src/tools/check_keywords.pl
--- b/src/tools/check_keywords.pl
***************
*** 16,22 **** if (@ARGV) {
$path = ".";
}
- $[ = 1; # set array base to 1
$, = ' '; # set output field separator
$\ = "\n"; # set output record separator
--- 16,21 ----
***************
*** 60,66 **** line: while (<GRAM>) {
$n = (@arr = split(' ', $S));
# Ok, we're in a keyword list. Go through each field in turn
! for (my $fieldIndexer = 1; $fieldIndexer <= $n; $fieldIndexer++) {
if ($arr[$fieldIndexer] eq '*/' && $comment) {
$comment = 0;
next;
--- 59,65 ----
$n = (@arr = split(' ', $S));
# Ok, we're in a keyword list. Go through each field in turn
! for (my $fieldIndexer = 0; $fieldIndexer < $n; $fieldIndexer++) {
if ($arr[$fieldIndexer] eq '*/' && $comment) {
$comment = 0;
next;
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers