]> granicus.if.org Git - postgis/commitdiff
Applied 'strictness' patch by James Marca
authorSandro Santilli <strk@keybit.net>
Wed, 18 May 2005 17:01:28 +0000 (17:01 +0000)
committerSandro Santilli <strk@keybit.net>
Wed, 18 May 2005 17:01:28 +0000 (17:01 +0000)
git-svn-id: http://svn.osgeo.org/postgis/branches/pgis_1_0@1718 b70326c6-7e19-0410-871a-916f4a2858ee

CHANGES
utils/postgis_restore.pl

diff --git a/CHANGES b/CHANGES
index 852c7dc456a553c50de21e2acac18e9e7a4db7ff..9fab4dc63c74e12210895b3eb64bc2aafe961415 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,7 @@ PostGIS 1.0.1
        - NEW support for custom createdb options in postgis_restore.pl
        - BUGFIX in pgsql2shp attribute names unicity enforcement
        - BUGFIX in Paris projections definitions
+       - postgis_restore.pl cleanups
 
 PostGIS 1.0.0
 2005/04/19
index c299381f917bb9895c576af7253f9f4708beb98e..4913afe0097599cbe22e69a37e5fa82fb81774b9 100644 (file)
 #      pg_dump-743/pg743 => pg_restore-800/pg800
 #      pg_dump-800/pg800 => pg_restore-800/pg800
 #
-
 eval "exec perl -w $0 $@"
        if (0);
 
+use strict;
+
 (@ARGV >= 3) || die "Usage: postgis_restore.pl <postgis.sql> <db> <dump> [<createdb_options>]\nRestore a custom dump (pg_dump -Fc) of a postgis enabled database.\n";
 
-$DEBUG=1;
+my $DEBUG=1;
 
 my %aggs = ();
 my %fncasts = ();
@@ -131,7 +132,7 @@ while( my $line = <INPUT>)
                my $geomfound = 0;
                for (my $i=0; $i<@args; $i++)
                {
-                       $arg = lc($args[$i]);
+                       my $arg = lc($args[$i]);
                        #print "ARG1: [$arg]\n";
                        $arg =~ s/^ *//;
                        $arg =~ s/ *$//;
@@ -166,7 +167,7 @@ while( my $line = <INPUT>)
                {
                        for (my $i=0; $i<@args; $i++)
                        {
-                               $arg = $args[$i];
+                               my $arg = $args[$i];
                                $arg = 'geometry' if ($arg eq 'oldgeometry');
                                $args[$i] = $arg;
                        }
@@ -346,7 +347,7 @@ while( my $line = <INPUT> )
                my $wkbinvolved = 0;
                for (my $i=0; $i<@args; $i++)
                {
-                       $arg = lc($args[$i]);
+                       my $arg = lc($args[$i]);
                        $arg =~ s/^ *//;
                        $arg =~ s/ *$//;
                        $arg =~ s/^public.//;
@@ -358,7 +359,7 @@ while( my $line = <INPUT> )
                        $wkbinvolved++ if ( $arg eq 'wkb' );
                }
 
-               $args = join(', ', @args);
+               my $args = join(', ', @args);
                #print "ARGS SCALAR: [$args]\n";
                my $id = $funcname."(".$args.")";
                #print "ID: [$id]\n";
@@ -396,7 +397,7 @@ while( my $line = <INPUT> )
                my @args = split(",", $3);
                for (my $i=0; $i<@args; $i++)
                {
-                       $arg = lc($args[$i]);
+                       my $arg = lc($args[$i]);
                        $arg =~ s/^ *//;
                        $arg =~ s/ *$//;
                        $arg =~ s/^public.//;
@@ -406,7 +407,7 @@ while( my $line = <INPUT> )
                        }
                        $args[$i] = $arg;
                }
-               $args = join(', ', @args);
+               my $args = join(', ', @args);
                my $id = $name."(".$args.")";
                if ( $aggs{$id} )
                {