1 --- lib/Geo/IP/PurePerl.pm Tue Mar 30 15:41:34 2010
2 +++ lib/Geo/IP/PurePerl.pm Mon Jan 09 18:58:11 2017
6 # --- unfortunately we do not know the path so we assume the
7 -# default path /usr/local/share/GeoIP
8 +# default path /usr/share/GeoIP
9 # if thats not true, you can set $Geo::IP::PurePerl::OPEN_TYPE_PATH
13 # this will be less messy once deprecated new( $path, [$flags] )
14 # is no longer supported (that's what open() is for)
16 - my $def_db_file = '/usr/local/share/GeoIP/GeoIP.dat';
17 + my $def_db_file = '/usr/share/GeoIP/GeoIP.dat';
18 if ($^O eq 'NetWare') {
19 $def_db_file = 'sys:/etc/GeoIP/GeoIP.dat';
20 } elsif ($^O eq 'MSWin32') {
22 =item $gi = Geo::IP->new( [$flags] );
24 Constructs a new Geo::IP object with the default database located inside your system's
25 -I<datadir>, typically I</usr/local/share/GeoIP/GeoIP.dat>.
26 +I<datadir>, typically I</usr/share/GeoIP/GeoIP.dat>.
28 Flags can be set to either GEOIP_STANDARD, or for faster performance
29 (at a cost of using more memory), GEOIP_MEMORY_CACHE.
30 --- t/1_lookup.t Tue Mar 30 15:13:37 2010
31 +++ t/1_lookup.t Mon Jan 09 18:58:13 2017
36 - foreach my $file ("GeoIP.dat",'/usr/local/share/GeoIP/GeoIP.dat') {
37 + foreach my $file ("GeoIP.dat",'/usr/share/GeoIP/GeoIP.dat') {
41 --- t/2_namelookup.t Tue Mar 30 15:21:37 2010
42 +++ t/2_namelookup.t Mon Jan 09 18:58:21 2017
47 - foreach my $file ("GeoIP.dat",'/usr/local/share/GeoIP/GeoIP.dat') {
48 + foreach my $file ("GeoIP.dat",'/usr/share/GeoIP/GeoIP.dat') {
52 --- Changes Tue Mar 30 15:26:38 2010
53 +++ Changes Mon Jan 09 18:57:37 2017
55 Country, City and Org requests benefit from GEOIP_MEMORY_CACHE and GEOIP_MMAP_CACHE
56 Add GEOIP_MMAP_CACHE support ( Peter Shipley )
57 Now works with new format of GeoIP ISP
58 - Corrected path to /usr/local/share/GeoIP/GeoIP.dat in geoip-lookup program.
59 + Corrected path to /usr/share/GeoIP/GeoIP.dat in geoip-lookup program.
62 Replaced CS/Serbia and Montenegro with RS/Serbia, removed ZR/Zaire, added ME/Montenegro
63 --- geoip-lookup Tue Mar 30 15:13:36 2010
64 +++ geoip-lookup Mon Jan 09 18:57:44 2017
67 The I<geoip-lookup> program will return the country for the IP address or
68 hostname given as the first command line argument.
69 -It queries the GeoIP Country database in C</usr/local/share/GeoIP/GeoIP.dat>.
70 +It queries the GeoIP Country database in C</usr/share/GeoIP/GeoIP.dat>.
72 By default it prints the ISO 3166 country code. Use the C<-l> option
73 to print the country name.
74 --- geoip-lookup-city Tue Mar 30 15:13:36 2010
75 +++ geoip-lookup-city Mon Jan 09 18:57:48 2017
80 -my $gi = Geo::IP::PurePerl->new( "/usr/local/share/GeoIP/GeoIPCity.dat",
81 +my $gi = Geo::IP::PurePerl->new( "/usr/share/GeoIP/GeoIPCity.dat",
85 --- geoip-lookup-isp Tue Mar 30 15:13:36 2010
86 +++ geoip-lookup-isp Mon Jan 09 18:57:50 2017
91 -my $gi = Geo::IP::PurePerl->new("/usr/local/share/GeoIP/GeoIPISP.dat",GEOIP_STANDARD);
92 +my $gi = Geo::IP::PurePerl->new("/usr/share/GeoIP/GeoIPISP.dat",GEOIP_STANDARD);
94 my $isp = $gi->org_by_name($addr);
96 --- geoip-lookup-netspeed Tue Mar 30 15:13:36 2010
97 +++ geoip-lookup-netspeed Mon Jan 09 18:57:53 2017
102 -my $gi = Geo::IP::PurePerl->new("/usr/local/share/GeoIP/GeoIPNetSpeed.dat",GEOIP_STANDARD);
103 +my $gi = Geo::IP::PurePerl->new("/usr/share/GeoIP/GeoIPNetSpeed.dat",GEOIP_STANDARD);
105 my $netspeed = $gi->id_by_addr($addr);
107 --- geoip-lookup-org Tue Mar 30 15:13:36 2010
108 +++ geoip-lookup-org Mon Jan 09 18:57:59 2017
113 -my $gi = Geo::IP::PurePerl->new("/usr/local/share/GeoIP/GeoIPOrg.dat",GEOIP_STANDARD);
114 +my $gi = Geo::IP::PurePerl->new("/usr/share/GeoIP/GeoIPOrg.dat",GEOIP_STANDARD);
116 my $org = $gi->org_by_name($addr);
118 --- geoip-lookup-region Tue Mar 30 15:13:36 2010
119 +++ geoip-lookup-region Mon Jan 09 18:58:01 2017
124 -my $gi = Geo::IP::PurePerl->new("/usr/local/share/GeoIP/GeoIPRegion.dat",GEOIP_STANDARD);
125 +my $gi = Geo::IP::PurePerl->new("/usr/share/GeoIP/GeoIPRegion.dat",GEOIP_STANDARD);
127 my ($country,$region) = $gi->region_by_name($addr);
129 --- INSTALL Tue Mar 30 15:13:36 2010
130 +++ INSTALL Mon Jan 09 18:58:05 2017
132 # fetch latest GeoIP database, updated monthly
133 wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
135 -mv GeoIP.dat /usr/local/share/GeoIP/GeoIP.dat
136 +mv GeoIP.dat /usr/share/GeoIP/GeoIP.dat