Ignore:
Timestamp:
2005-07-19T16:27:51+12:00 (19 years ago)
Author:
kjdon
Message:

added 'use strict' to all plugins, and made modifications (mostly adding 'my') to make them compile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/GISBasPlug.pm

    r9963 r10254  
    2828use util;
    2929use locale;
     30
     31use strict;
     32no strict 'refs'; # allow filehandles to be variables and viceversa
    3033
    3134#field categories in DataBase files
     
    3538my $DSG = 10;
    3639#$CC1 = 12;
    37 $FULL_NAME = 22;
     40my $FULL_NAME = 22;
    3841
    3942BEGIN {
     
    7679}
    7780
     81sub print_txt_usage
     82{
     83   BasPlug::print_txt_usage(@_);
     84}
    7885
    7986sub has_mapdata
     
    153160sub placename_to_anchorname {
    154161    my ($placename) = @_;
    155     $p_tag = lc($placename);
     162    my $p_tag = lc($placename);
    156163    $p_tag =~ s/\s+//g;
    157164    return $p_tag;
     
    202209    #finds 'dangerous' placenames (eg York and New York). Dangerous because program will find "York" within "New York" 
    203210    my %danger = ();   
    204     foreach $x (keys %$uniquePlaces){
    205     foreach $y (keys %$uniquePlaces){
     211    foreach my $x (keys %$uniquePlaces){
     212    foreach my $y (keys %$uniquePlaces){
    206213        if(($y =~ m/ /) && ($y =~ m/$x/) && ($y ne $x)){
    207214            $y =~ s/($x\s)|(\s$x)//;
     
    220227    foreach my $name (sort (keys %$uniquePlaces)){
    221228    if(!defined($danger{$name})){
    222         $name_tag = placename_to_anchorname($name);
     229        my $name_tag = placename_to_anchorname($name);
    223230        print FOUT "$name\t" . $uniquePlaces->{$name}->[$LONG] . "\t" . $uniquePlaces->{$name}->[$LAT] . "\n";
    224231        if($self->{'place_list'}) {$names = $names . "<a href=\"#" . $name_tag . "1\">" . $name . "</a>" . "\n";}
Note: See TracChangeset for help on using the changeset viewer.