| 1 | package HTML::Genealogy::Map; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||
| 3 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 3 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||||||||||
| 6 | 3 | ▶ | use utf8; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||
| 8 | 3 | ▶ | use open qw(:std :encoding(UTF-8)); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||||||||||
| 10 | 3 | ▶ | use autodie; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 11 | 3 | ▶ | use Date::Cmp; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 12 | 3 | ▶ | use HTML::GoogleMaps::V3; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 13 | 3 | ▶ | use HTML::OSM; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 14 | 3 | ▶ | use Object::Configure 0.15; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 15 | 3 | ▶ | use Params::Get 0.13; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 16 | 3 | ▶ | use Params::Validate::Strict 0.16; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||
| 18 | =head1 NAME | ||||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||||
| 20 | HTML::Genealogy::Map - Extract and map genealogical events from a GEDCOM file | ||||||||||||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||||||||||
| 22 | =head1 VERSION | ||||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||
| 24 | Version 0.04 | ||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||
| 26 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||
| 28 | 3 | our $VERSION = '0.04'; | |||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||
| 30 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||||||
| 32 | This module parses GEDCOM genealogy files and creates an interactive map showing | ||||||||||||||||||||||||||||||||||||||||||
| 33 | the locations of births, marriages, and deaths. Events at the same location are | ||||||||||||||||||||||||||||||||||||||||||
| 34 | grouped together in a single marker with a scrollable popup. | ||||||||||||||||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||||||||||||||||
| 36 | =head1 SUBROUTINES/METHODS | ||||||||||||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||||||||||||
| 38 | =head2 onload_render | ||||||||||||||||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||||||||||||||||
| 40 | Render the map. | ||||||||||||||||||||||||||||||||||||||||||
| 41 | It takes two mandatory and one optional parameter. | ||||||||||||||||||||||||||||||||||||||||||
| 42 | It returns an array of two elements, the items for the C<head> and C<body>. | ||||||||||||||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||||||||||||||
| 44 | =over 4 | ||||||||||||||||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||||||||||||||||
| 46 | =item B<gedcom> | ||||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||
| 48 | L<GEDCOM> object to process. | ||||||||||||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||||||||||||
| 50 | =item B<geocoder> | ||||||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||||||
| 52 | Geocoder to use. | ||||||||||||||||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||||||||||||||||
| 54 | =item B<google_key> | ||||||||||||||||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||||||||||||||||
| 56 | Key to Google's map API. | ||||||||||||||||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||||||||||||||||
| 58 | =item B<debug> | ||||||||||||||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||||||||||||||
| 60 | Enable print statements of what's going on | ||||||||||||||||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||||||||||||||||
| 62 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||||||||||||||||
| 64 | =head1 FEATURES | ||||||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||||||
| 66 | =over 4 | ||||||||||||||||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||||||||||||||||
| 68 | =item * Extracts births, marriages, and deaths with location data | ||||||||||||||||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||||||||||||||||
| 70 | =item * Geocodes locations using multiple fallback providers | ||||||||||||||||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||||||||||||||||
| 72 | =item * Groups events at the same location (within ~0.1m precision) | ||||||||||||||||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||||||||||||||||
| 74 | =item * Color-coded event indicators (green=birth, blue=marriage, red=death) | ||||||||||||||||||||||||||||||||||||||||||
| 75 | |||||||||||||||||||||||||||||||||||||||||||
| 76 | =item * Sorts events chronologically within each category | ||||||||||||||||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||||||||||||||||
| 78 | =item * Scrollable popups for locations with more than 5 events | ||||||||||||||||||||||||||||||||||||||||||
| 79 | |||||||||||||||||||||||||||||||||||||||||||
| 80 | =item * Persistent caching of geocoding results | ||||||||||||||||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||||||||||||||||
| 82 | =item * For OpenStreetMap: centers on location with most events | ||||||||||||||||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||||||||||||||||
| 84 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 85 | |||||||||||||||||||||||||||||||||||||||||||
| 86 | =head3 API SPECIFICATION | ||||||||||||||||||||||||||||||||||||||||||
| 87 | |||||||||||||||||||||||||||||||||||||||||||
| 88 | =head4 INPUT | ||||||||||||||||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||||||||||||||||
| 90 | { | ||||||||||||||||||||||||||||||||||||||||||
| 91 | 'gedcom' => { 'type' => 'object', 'can' => 'individuals' }, | ||||||||||||||||||||||||||||||||||||||||||
| 92 | 'geocoder' => { 'type' => 'object', 'can' => 'geocode' }, | ||||||||||||||||||||||||||||||||||||||||||
| 93 | 'debug' => { 'type' => 'boolean', optional => 1 }, | ||||||||||||||||||||||||||||||||||||||||||
| 94 | 'google_key' => { 'type' => 'string', optional => 1, min => 39, max => 39, matches => qr/^AIza[0-9A-Za-z_-]{35}$/ }, | ||||||||||||||||||||||||||||||||||||||||||
| 95 | 'height' => { optional => 1 }, | ||||||||||||||||||||||||||||||||||||||||||
| 96 | 'width' => { optional => 1 } | ||||||||||||||||||||||||||||||||||||||||||
| 97 | } | ||||||||||||||||||||||||||||||||||||||||||
| 98 | |||||||||||||||||||||||||||||||||||||||||||
| 99 | =head4 OUTPUT | ||||||||||||||||||||||||||||||||||||||||||
| 100 | |||||||||||||||||||||||||||||||||||||||||||
| 101 | Argument error: croak | ||||||||||||||||||||||||||||||||||||||||||
| 102 | No matches found: undef | ||||||||||||||||||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||||||||||||||||
| 104 | Returns an array of two strings: | ||||||||||||||||||||||||||||||||||||||||||
| 105 | |||||||||||||||||||||||||||||||||||||||||||
| 106 | { | ||||||||||||||||||||||||||||||||||||||||||
| 107 | 'type' => 'array', | ||||||||||||||||||||||||||||||||||||||||||
| 108 | 'min' => 2, | ||||||||||||||||||||||||||||||||||||||||||
| 109 | 'max' => 2, | ||||||||||||||||||||||||||||||||||||||||||
| 110 | 'schema' => { 'type' => 'string', min => 10 }, | ||||||||||||||||||||||||||||||||||||||||||
| 111 | } | ||||||||||||||||||||||||||||||||||||||||||
| 112 | |||||||||||||||||||||||||||||||||||||||||||
| 113 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 114 | |||||||||||||||||||||||||||||||||||||||||||
| 115 | sub onload_render | ||||||||||||||||||||||||||||||||||||||||||
| 116 | 91 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
onload_render: called CC=42 SCAR=40.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 117 | 91 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 118 | |||||||||||||||||||||||||||||||||||||||||||
| 119 | # Configuration | ||||||||||||||||||||||||||||||||||||||||||
| 120 | 91 | my $params = Params::Validate::Strict::validate_strict({ | |||||||||||||||||||||||||||||||||||||||||
| 121 | args => Params::Get::get_params('gedcom', @_), | ||||||||||||||||||||||||||||||||||||||||||
| 122 | schema => { | ||||||||||||||||||||||||||||||||||||||||||
| 123 | 'gedcom' => { 'type' => 'object', 'can' => 'individuals' }, | ||||||||||||||||||||||||||||||||||||||||||
| 124 | 'geocoder' => { 'type' => 'object', 'can' => 'geocode' }, | ||||||||||||||||||||||||||||||||||||||||||
| 125 | 'debug' => { 'type' => 'boolean', optional => 1 }, | ||||||||||||||||||||||||||||||||||||||||||
| 126 | 'google_key' => { 'type' => 'string', optional => 1, min => 39, max => 39, matches => qr/^AIza[0-9A-Za-z_-]{35}$/ }, | ||||||||||||||||||||||||||||||||||||||||||
| 127 | 'height' => { optional => 1 }, | ||||||||||||||||||||||||||||||||||||||||||
| 128 | 'width' => { optional => 1 }, | ||||||||||||||||||||||||||||||||||||||||||
| 129 | } | ||||||||||||||||||||||||||||||||||||||||||
| 130 | }); | ||||||||||||||||||||||||||||||||||||||||||
| 131 | |||||||||||||||||||||||||||||||||||||||||||
| 132 | 71 | $params = Object::Configure::configure($class, $params); | |||||||||||||||||||||||||||||||||||||||||
| 133 | |||||||||||||||||||||||||||||||||||||||||||
| 134 | 71 | my $ged = $params->{'gedcom'}; | |||||||||||||||||||||||||||||||||||||||||
| 135 | 71 | my $debug = $params->{'debug'}; | |||||||||||||||||||||||||||||||||||||||||
| 136 | 71 | my $google_key = $params->{'google_key'}; | |||||||||||||||||||||||||||||||||||||||||
| 137 | 71 | my $geocoder = $params->{'geocoder'}; | |||||||||||||||||||||||||||||||||||||||||
| 138 | 71 | ▶ | my $height = $params->{'height'} || '400px'; | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$params->{'height'} || '400px'
MC/DC0%0/1
$params->{'height'} || '400px'
$params->{'height'}
Truth table50%1/2
A
A= $params->{'height'}
| |||||||||||||||||||||||||||||||||||||||||||
| 139 | 71 | ▶ | my $width = $params->{'width'} || '600px'; | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$params->{'width'} || '600px'
MC/DC0%0/1
$params->{'width'} || '600px'
$params->{'width'}
Truth table50%1/2
A
A= $params->{'width'}
| |||||||||||||||||||||||||||||||||||||||||||
| 140 | |||||||||||||||||||||||||||||||||||||||||||
| 141 | # Storage for events | ||||||||||||||||||||||||||||||||||||||||||
| 142 | 71 | my @events; | |||||||||||||||||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||||||||||||||||
| 144 | 71 | ▶ | print "Parsing GEDCOM file...\n" if($debug); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 145 | |||||||||||||||||||||||||||||||||||||||||||
| 146 | # Process all individuals | ||||||||||||||||||||||||||||||||||||||||||
| 147 | 71 | foreach my $indi ($ged->individuals) { | |||||||||||||||||||||||||||||||||||||||||
| 148 | 68 | ▶ | next unless(ref($indi)); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 149 | 6 | ▶ | my $name = $indi->name || 'Unknown'; | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$indi->name || 'Unknown'
MC/DC0%0/1
$indi->name || 'Unknown'
$indi->name
Truth table50%1/2
A
A= $indi->name
| |||||||||||||||||||||||||||||||||||||||||||
| 150 | 6 | $name =~ s/\///g; # Remove GEDCOM name delimiters | |||||||||||||||||||||||||||||||||||||||||
| 151 | 6 | $name =~ s/'/'/g; # Probably this is enough HTML::Entities | |||||||||||||||||||||||||||||||||||||||||
| 152 | |||||||||||||||||||||||||||||||||||||||||||
| 153 | # Birth events | ||||||||||||||||||||||||||||||||||||||||||
| 154 | 6 | ▶ | if (my $birth = $indi->birth) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 155 | 5 | ▶ | if (ref($birth) && (my $place = $birth->place)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
ref $birth and my $place = $birth->place
MC/DC50%1/2
ref $birth and my $place = $birth->place
ref $birth
my $place = $birth->place
Truth table66%2/3
A and B
A= ref $birthB= my $place = $birth->place
| |||||||||||||||||||||||||||||||||||||||||||
| 156 | 4 | ▶ | push @events, { | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$birth->date || 'Unknown date'
MC/DC0%0/1
$birth->date || 'Unknown date'
$birth->date
Truth table50%1/2
A
A= $birth->date
| |||||||||||||||||||||||||||||||||||||||||||
| 157 | type => 'birth', | ||||||||||||||||||||||||||||||||||||||||||
| 158 | name => $name, | ||||||||||||||||||||||||||||||||||||||||||
| 159 | place => $place, | ||||||||||||||||||||||||||||||||||||||||||
| 160 | date => $birth->date || 'Unknown date', | ||||||||||||||||||||||||||||||||||||||||||
| 161 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 162 | } | ||||||||||||||||||||||||||||||||||||||||||
| 163 | } | ||||||||||||||||||||||||||||||||||||||||||
| 164 | |||||||||||||||||||||||||||||||||||||||||||
| 165 | # Death events | ||||||||||||||||||||||||||||||||||||||||||
| 166 | 6 | ▶ | if (my $death = $indi->death) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 167 | 1 | ▶ | if (ref($death) && (my $place = $death->place)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
ref $death and my $place = $death->place
MC/DC0%0/2
ref $death and my $place = $death->place
ref $death
my $place = $death->place
Truth table33%1/3
A and B
A= ref $deathB= my $place = $death->place
| |||||||||||||||||||||||||||||||||||||||||||
| 168 | 1 | ▶ | push @events, { | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$death->date || 'Unknown date'
MC/DC0%0/1
$death->date || 'Unknown date'
$death->date
Truth table50%1/2
A
A= $death->date
| |||||||||||||||||||||||||||||||||||||||||||
| 169 | type => 'death', | ||||||||||||||||||||||||||||||||||||||||||
| 170 | name => $name, | ||||||||||||||||||||||||||||||||||||||||||
| 171 | place => $place, | ||||||||||||||||||||||||||||||||||||||||||
| 172 | date => $death->date || 'Unknown date', | ||||||||||||||||||||||||||||||||||||||||||
| 173 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 174 | } | ||||||||||||||||||||||||||||||||||||||||||
| 175 | } | ||||||||||||||||||||||||||||||||||||||||||
| 176 | } | ||||||||||||||||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||||||||||||||||
| 178 | # Process all families (marriages) | ||||||||||||||||||||||||||||||||||||||||||
| 179 | 71 | foreach my $fam ($ged->families) { | |||||||||||||||||||||||||||||||||||||||||
| 180 | 63 | ▶ | next unless defined($fam) && ref($fam); # Yes, really | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $fam and ref $fam
MC/DC50%1/2
defined $fam and ref $fam
defined $fam
ref $fam
Truth table66%2/3
A and B
A= defined $famB= ref $fam
| |||||||||||||||||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||||||||||||||||
| 182 | 1 | ▶ | my $husband = (ref($fam->husband) && $fam->husband->name) ? $fam->husband->name : 'Unknown'; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
ref $fam->husband and $fam->husband->name
MC/DC0%0/2
ref $fam->husband and $fam->husband->name
ref $fam->husband
$fam->husband->name
Truth table33%1/3
A and B
A= ref $fam->husbandB= $fam->husband->name
| |||||||||||||||||||||||||||||||||||||||||||
| 183 | 1 | ▶ | my $wife = (ref($fam->wife) && $fam->wife->name) ? $fam->wife->name : 'Unknown'; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
ref $fam->wife and $fam->wife->name
MC/DC0%0/2
ref $fam->wife and $fam->wife->name
ref $fam->wife
$fam->wife->name
Truth table33%1/3
A and B
A= ref $fam->wifeB= $fam->wife->name
| |||||||||||||||||||||||||||||||||||||||||||
| 184 | |||||||||||||||||||||||||||||||||||||||||||
| 185 | 1 | $husband =~ s/\///g; | |||||||||||||||||||||||||||||||||||||||||
| 186 | 1 | $wife =~ s/\///g; | |||||||||||||||||||||||||||||||||||||||||
| 187 | |||||||||||||||||||||||||||||||||||||||||||
| 188 | 1 | ▶ | if (my $marriage = $fam->marriage) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 189 | 1 | ▶ | if (ref($marriage) && (my $place = $marriage->place)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
ref $marriage and my $place = $marriage->place
MC/DC0%0/2
ref $marriage and my $place = $marriage->place
ref $marriage
my $place = $marriage->place
Truth table33%1/3
A and B
A= ref $marriageB= my $place = $marriage->place
| |||||||||||||||||||||||||||||||||||||||||||
| 190 | 1 | $husband =~ s/'/'/; | |||||||||||||||||||||||||||||||||||||||||
| 191 | 1 | $wife =~ s/'/'/; | |||||||||||||||||||||||||||||||||||||||||
| 192 | 1 | ▶ | push @events, { | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$marriage->date || 'Unknown date'
MC/DC0%0/1
$marriage->date || 'Unknown date'
$marriage->date
Truth table50%1/2
A
A= $marriage->date
| |||||||||||||||||||||||||||||||||||||||||||
| 193 | type => 'marriage', | ||||||||||||||||||||||||||||||||||||||||||
| 194 | name => "$husband & $wife", | ||||||||||||||||||||||||||||||||||||||||||
| 195 | place => $place, | ||||||||||||||||||||||||||||||||||||||||||
| 196 | date => $marriage->date || 'Unknown date', | ||||||||||||||||||||||||||||||||||||||||||
| 197 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 198 | } | ||||||||||||||||||||||||||||||||||||||||||
| 199 | } | ||||||||||||||||||||||||||||||||||||||||||
| 200 | } | ||||||||||||||||||||||||||||||||||||||||||
| 201 | |||||||||||||||||||||||||||||||||||||||||||
| 202 | 71 | ▶ | print 'Found ', scalar(@events), " events with location data.\n" if($debug); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 203 | 71 | ▶ | print "Geocoding locations...\n" if($debug); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 204 | |||||||||||||||||||||||||||||||||||||||||||
| 205 | # Geocode all events | ||||||||||||||||||||||||||||||||||||||||||
| 206 | 71 | my @geocoded_events; | |||||||||||||||||||||||||||||||||||||||||
| 207 | my %cache; # TODO allow use of params->{cache} if given | ||||||||||||||||||||||||||||||||||||||||||
| 208 | |||||||||||||||||||||||||||||||||||||||||||
| 209 | 71 | foreach my $event (@events) { | |||||||||||||||||||||||||||||||||||||||||
| 210 | 6 | my $place = $event->{place}; | |||||||||||||||||||||||||||||||||||||||||
| 211 | |||||||||||||||||||||||||||||||||||||||||||
| 212 | # Check cache | ||||||||||||||||||||||||||||||||||||||||||
| 213 | 6 | ▶ | unless (exists $cache{$place}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 214 | 5 | my $location = $geocoder->geocode(location => $place); | |||||||||||||||||||||||||||||||||||||||||
| 215 | 5 | ▶ | if ($location && $location->{lat} && $location->{lon}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%4/6
$location and $location->{"lat"} and $location->{"lon"}
$location and $location->{"lat"}
MC/DC33%1/3
$location and $location->{"lat"} and $location->{"lon"}
$location
$location->{"lat"}
$location->{"lon"}
Truth table50%2/4
A and B and C
A= $locationB= $location->{"lat"}C= $location->{"lon"}
| |||||||||||||||||||||||||||||||||||||||||||
| 216 | $cache{$place} = { | ||||||||||||||||||||||||||||||||||||||||||
| 217 | lat => $location->{lat}, | ||||||||||||||||||||||||||||||||||||||||||
| 218 | lon => $location->{lon}, | ||||||||||||||||||||||||||||||||||||||||||
| 219 | 4 | }; | |||||||||||||||||||||||||||||||||||||||||
| 220 | 4 | ▶ | print "\tGeocoded: $place\n" if($debug); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 221 | 4 | ▶ | sleep 1 if($location->{'geocoder'} !~ /^Geo::Coder::Free/); # Be nice to geocoding service | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 222 | |||||||||||||||||||||||||||||||||||||||||||
| 223 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 224 | 1 | ▶ | print "\tFailed to geocode: $place\n" if($debug); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 225 | 1 | $cache{$place} = undef; | |||||||||||||||||||||||||||||||||||||||||
| 226 | 1 | sleep 1; # Be nice to geocoding service | |||||||||||||||||||||||||||||||||||||||||
| 227 | } | ||||||||||||||||||||||||||||||||||||||||||
| 228 | } | ||||||||||||||||||||||||||||||||||||||||||
| 229 | |||||||||||||||||||||||||||||||||||||||||||
| 230 | 6 | ▶ | if ($cache{$place}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 231 | push @geocoded_events, { | ||||||||||||||||||||||||||||||||||||||||||
| 232 | %$event, | ||||||||||||||||||||||||||||||||||||||||||
| 233 | lat => $cache{$place}{lat}, | ||||||||||||||||||||||||||||||||||||||||||
| 234 | lon => $cache{$place}{lon}, | ||||||||||||||||||||||||||||||||||||||||||
| 235 | 5 | }; | |||||||||||||||||||||||||||||||||||||||||
| 236 | } | ||||||||||||||||||||||||||||||||||||||||||
| 237 | } | ||||||||||||||||||||||||||||||||||||||||||
| 238 | |||||||||||||||||||||||||||||||||||||||||||
| 239 | 71 | ▶ | print 'Successfully geocoded ', scalar(@geocoded_events), " events.\n" if($debug); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 240 | |||||||||||||||||||||||||||||||||||||||||||
| 241 | 71 | ▶ | return('', '') if(scalar(@geocoded_events) == 0); # Empty | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 242 | |||||||||||||||||||||||||||||||||||||||||||
| 243 | 4 | ▶ | print "Generating map...\n" if($debug); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 244 | |||||||||||||||||||||||||||||||||||||||||||
| 245 | # Group events by location | ||||||||||||||||||||||||||||||||||||||||||
| 246 | 4 | my %location_groups; | |||||||||||||||||||||||||||||||||||||||||
| 247 | 4 | foreach my $event (@geocoded_events) { | |||||||||||||||||||||||||||||||||||||||||
| 248 | 5 | my $key = sprintf('%.6f,%.6f', $event->{lat}, $event->{lon}); | |||||||||||||||||||||||||||||||||||||||||
| 249 | 5 | push @{$location_groups{$key}}, $event; | |||||||||||||||||||||||||||||||||||||||||
| 250 | } | ||||||||||||||||||||||||||||||||||||||||||
| 251 | |||||||||||||||||||||||||||||||||||||||||||
| 252 | # Generate map based on available API key | ||||||||||||||||||||||||||||||||||||||||||
| 253 | 4 | my $map; | |||||||||||||||||||||||||||||||||||||||||
| 254 | 4 | ▶ | if ($google_key) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 255 | 0 | $map = _generate_google_map(\%location_groups, $height, $width, $google_key); | |||||||||||||||||||||||||||||||||||||||||
| 256 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 257 | 4 | $map = _generate_osm_map(\%location_groups, $height, $width); | |||||||||||||||||||||||||||||||||||||||||
| 258 | } | ||||||||||||||||||||||||||||||||||||||||||
| 259 | |||||||||||||||||||||||||||||||||||||||||||
| 260 | 4 | return $map->onload_render(); | |||||||||||||||||||||||||||||||||||||||||
| 261 | } | ||||||||||||||||||||||||||||||||||||||||||
| 262 | |||||||||||||||||||||||||||||||||||||||||||
| 263 | # Generate HTML for grouped events | ||||||||||||||||||||||||||||||||||||||||||
| 264 | 4 | ▶ | sub _generate_popup_html { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_generate_popup_html: called CC=9 SCAR=22.6
| |||||||||||||||||||||||||||||||||||||||||||
| 265 | 4 | my ($events) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 266 | |||||||||||||||||||||||||||||||||||||||||||
| 267 | 4 | my $place = $events->[0]{place}; | |||||||||||||||||||||||||||||||||||||||||
| 268 | 4 | my $event_count = scalar(@$events); | |||||||||||||||||||||||||||||||||||||||||
| 269 | |||||||||||||||||||||||||||||||||||||||||||
| 270 | # Add scrollable container if more than 5 events | ||||||||||||||||||||||||||||||||||||||||||
| 271 | 4 | my $container_start = ''; | |||||||||||||||||||||||||||||||||||||||||
| 272 | 4 | my $container_end = ''; | |||||||||||||||||||||||||||||||||||||||||
| 273 | 4 | ▶ | if ($event_count > 5) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 274 | 0 | $container_start = '<div style="max-height: 300px; overflow-y: auto;">'; | |||||||||||||||||||||||||||||||||||||||||
| 275 | 0 | $container_end = '</div>'; | |||||||||||||||||||||||||||||||||||||||||
| 276 | } | ||||||||||||||||||||||||||||||||||||||||||
| 277 | |||||||||||||||||||||||||||||||||||||||||||
| 278 | 4 | my $html = "<b>$place</b><br><br>$container_start"; | |||||||||||||||||||||||||||||||||||||||||
| 279 | |||||||||||||||||||||||||||||||||||||||||||
| 280 | # Group by type | ||||||||||||||||||||||||||||||||||||||||||
| 281 | 4 | my %by_type; | |||||||||||||||||||||||||||||||||||||||||
| 282 | 4 | foreach my $event (@$events) { | |||||||||||||||||||||||||||||||||||||||||
| 283 | 5 | push @{$by_type{$event->{type}}}, $event; | |||||||||||||||||||||||||||||||||||||||||
| 284 | } | ||||||||||||||||||||||||||||||||||||||||||
| 285 | |||||||||||||||||||||||||||||||||||||||||||
| 286 | # Sort function for dates | ||||||||||||||||||||||||||||||||||||||||||
| 287 | 1 | ▶ | my $sort_by_date = sub { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=7 SCAR=23.8
| |||||||||||||||||||||||||||||||||||||||||||
| 288 | 1 | my $date_a = $a->{'date'}; | |||||||||||||||||||||||||||||||||||||||||
| 289 | 1 | my $date_b = $b->{'date'}; | |||||||||||||||||||||||||||||||||||||||||
| 290 | |||||||||||||||||||||||||||||||||||||||||||
| 291 | # Put unknown dates at the end | ||||||||||||||||||||||||||||||||||||||||||
| 292 | 1 | ▶ | return 1 if $date_a =~ /^Unknown/i && $date_b !~ /^Unknown/i; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$date_a =~ /^Unknown/i and not $date_b =~ /^Unknown/i
MC/DC0%0/2
$date_a =~ /^Unknown/i and not $date_b =~ /^Unknown/i
$date_a =~ /^Unknown/i
not $date_b =~ /^Unknown/i
Truth table33%1/3
A and not(B)
A= $date_a =~ /^Unknown/iB= not $date_b =~ /^Unknown/i
| |||||||||||||||||||||||||||||||||||||||||||
| 293 | 1 | ▶ | return -1 if $date_b =~ /^Unknown/i && $date_a !~ /^Unknown/i; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$date_b =~ /^Unknown/i and not $date_a =~ /^Unknown/i
MC/DC0%0/2
$date_b =~ /^Unknown/i and not $date_a =~ /^Unknown/i
$date_b =~ /^Unknown/i
not $date_a =~ /^Unknown/i
Truth table33%1/3
A and not(B)
A= $date_b =~ /^Unknown/iB= not $date_a =~ /^Unknown/i
| |||||||||||||||||||||||||||||||||||||||||||
| 294 | 1 | ▶ | return 0 if $date_a =~ /^Unknown/i && $date_b =~ /^Unknown/i; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$date_a =~ /^Unknown/i and $date_b =~ /^Unknown/i
MC/DC0%0/2
$date_a =~ /^Unknown/i and $date_b =~ /^Unknown/i
$date_a =~ /^Unknown/i
$date_b =~ /^Unknown/i
Truth table33%1/3
A and B
A= $date_a =~ /^Unknown/iB= $date_b =~ /^Unknown/i
| |||||||||||||||||||||||||||||||||||||||||||
| 295 | |||||||||||||||||||||||||||||||||||||||||||
| 296 | 1 | return Date::Cmp::datecmp($date_a, $date_b); | |||||||||||||||||||||||||||||||||||||||||
| 297 | 4 | }; | |||||||||||||||||||||||||||||||||||||||||
| 298 | |||||||||||||||||||||||||||||||||||||||||||
| 299 | # Add births | ||||||||||||||||||||||||||||||||||||||||||
| 300 | 4 | ▶ | if ($by_type{birth}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 301 | 2 | $html .= '<b>Births:</b><br>'; | |||||||||||||||||||||||||||||||||||||||||
| 302 | 2 | foreach my $event (sort $sort_by_date @{$by_type{birth}}) { | |||||||||||||||||||||||||||||||||||||||||
| 303 | $html .= sprintf( | ||||||||||||||||||||||||||||||||||||||||||
| 304 | '<span style="color: green; font-size: 20px;">●</span> %s (%s)<br>', | ||||||||||||||||||||||||||||||||||||||||||
| 305 | $event->{name}, | ||||||||||||||||||||||||||||||||||||||||||
| 306 | $event->{date} | ||||||||||||||||||||||||||||||||||||||||||
| 307 | 3 | ); | |||||||||||||||||||||||||||||||||||||||||
| 308 | } | ||||||||||||||||||||||||||||||||||||||||||
| 309 | 2 | $html .= '<br>'; | |||||||||||||||||||||||||||||||||||||||||
| 310 | } | ||||||||||||||||||||||||||||||||||||||||||
| 311 | |||||||||||||||||||||||||||||||||||||||||||
| 312 | # Add marriages | ||||||||||||||||||||||||||||||||||||||||||
| 313 | 4 | ▶ | if ($by_type{marriage}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 314 | 1 | $html .= '<b>Marriages:</b><br>'; | |||||||||||||||||||||||||||||||||||||||||
| 315 | 1 | foreach my $event (sort $sort_by_date @{$by_type{marriage}}) { | |||||||||||||||||||||||||||||||||||||||||
| 316 | $html .= sprintf( | ||||||||||||||||||||||||||||||||||||||||||
| 317 | '<span style="color: blue; font-size: 20px;">●</span> %s (%s)<br>', | ||||||||||||||||||||||||||||||||||||||||||
| 318 | $event->{name}, | ||||||||||||||||||||||||||||||||||||||||||
| 319 | $event->{date} | ||||||||||||||||||||||||||||||||||||||||||
| 320 | 1 | ); | |||||||||||||||||||||||||||||||||||||||||
| 321 | } | ||||||||||||||||||||||||||||||||||||||||||
| 322 | 1 | $html .= '<br>'; | |||||||||||||||||||||||||||||||||||||||||
| 323 | } | ||||||||||||||||||||||||||||||||||||||||||
| 324 | |||||||||||||||||||||||||||||||||||||||||||
| 325 | # Add deaths | ||||||||||||||||||||||||||||||||||||||||||
| 326 | 4 | ▶ | if ($by_type{death}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 327 | 1 | $html .= '<b>Deaths:</b><br>'; | |||||||||||||||||||||||||||||||||||||||||
| 328 | 1 | foreach my $event (sort $sort_by_date @{$by_type{death}}) { | |||||||||||||||||||||||||||||||||||||||||
| 329 | $html .= sprintf( | ||||||||||||||||||||||||||||||||||||||||||
| 330 | '<span style="color: red; font-size: 20px;">●</span> %s (%s)<br>', | ||||||||||||||||||||||||||||||||||||||||||
| 331 | $event->{name}, | ||||||||||||||||||||||||||||||||||||||||||
| 332 | $event->{date} | ||||||||||||||||||||||||||||||||||||||||||
| 333 | 1 | ); | |||||||||||||||||||||||||||||||||||||||||
| 334 | } | ||||||||||||||||||||||||||||||||||||||||||
| 335 | } | ||||||||||||||||||||||||||||||||||||||||||
| 336 | |||||||||||||||||||||||||||||||||||||||||||
| 337 | 4 | $html .= $container_end; | |||||||||||||||||||||||||||||||||||||||||
| 338 | |||||||||||||||||||||||||||||||||||||||||||
| 339 | 4 | return $html; | |||||||||||||||||||||||||||||||||||||||||
| 340 | } | ||||||||||||||||||||||||||||||||||||||||||
| 341 | |||||||||||||||||||||||||||||||||||||||||||
| 342 | # Generate Google Maps | ||||||||||||||||||||||||||||||||||||||||||
| 343 | 0 | ▶ | sub _generate_google_map { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_generate_google_map: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||
| 344 | 0 | my ($location_groups, $height, $width, $key) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 345 | |||||||||||||||||||||||||||||||||||||||||||
| 346 | 0 | my $map = HTML::GoogleMaps::V3->new( | |||||||||||||||||||||||||||||||||||||||||
| 347 | key => $key, | ||||||||||||||||||||||||||||||||||||||||||
| 348 | height => $height, | ||||||||||||||||||||||||||||||||||||||||||
| 349 | width => $width | ||||||||||||||||||||||||||||||||||||||||||
| 350 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 351 | |||||||||||||||||||||||||||||||||||||||||||
| 352 | # Add markers for each location | ||||||||||||||||||||||||||||||||||||||||||
| 353 | 0 | my $first = 1; | |||||||||||||||||||||||||||||||||||||||||
| 354 | 0 | foreach my $loc_key (keys %$location_groups) { | |||||||||||||||||||||||||||||||||||||||||
| 355 | 0 | my $events = $location_groups->{$loc_key}; | |||||||||||||||||||||||||||||||||||||||||
| 356 | 0 | my ($lat, $lon) = split /,/, $loc_key; | |||||||||||||||||||||||||||||||||||||||||
| 357 | |||||||||||||||||||||||||||||||||||||||||||
| 358 | 0 | my $html = _generate_popup_html($events); | |||||||||||||||||||||||||||||||||||||||||
| 359 | |||||||||||||||||||||||||||||||||||||||||||
| 360 | 0 | $map->add_marker( | |||||||||||||||||||||||||||||||||||||||||
| 361 | point => [$lat, $lon], | ||||||||||||||||||||||||||||||||||||||||||
| 362 | html => $html, | ||||||||||||||||||||||||||||||||||||||||||
| 363 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 364 | |||||||||||||||||||||||||||||||||||||||||||
| 365 | # Center on first location | ||||||||||||||||||||||||||||||||||||||||||
| 366 | 0 | ▶ | if ($first) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 367 | 0 | $map->center([$lat, $lon]); | |||||||||||||||||||||||||||||||||||||||||
| 368 | 0 | $map->zoom(4); | |||||||||||||||||||||||||||||||||||||||||
| 369 | 0 | $first = 0; | |||||||||||||||||||||||||||||||||||||||||
| 370 | } | ||||||||||||||||||||||||||||||||||||||||||
| 371 | } | ||||||||||||||||||||||||||||||||||||||||||
| 372 | |||||||||||||||||||||||||||||||||||||||||||
| 373 | 0 | return $map; | |||||||||||||||||||||||||||||||||||||||||
| 374 | } | ||||||||||||||||||||||||||||||||||||||||||
| 375 | |||||||||||||||||||||||||||||||||||||||||||
| 376 | # Generate OpenStreetMap using HTML::OSM | ||||||||||||||||||||||||||||||||||||||||||
| 377 | 4 | ▶ | sub _generate_osm_map { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_generate_osm_map: called CC=4 SCAR=13.9
| |||||||||||||||||||||||||||||||||||||||||||
| 378 | 4 | my ($location_groups, $height, $width) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 379 | |||||||||||||||||||||||||||||||||||||||||||
| 380 | # Create HTML::OSM object | ||||||||||||||||||||||||||||||||||||||||||
| 381 | 4 | my $osm = HTML::OSM->new(zoom => 12, height => $height, width => $width); | |||||||||||||||||||||||||||||||||||||||||
| 382 | |||||||||||||||||||||||||||||||||||||||||||
| 383 | # Add markers for each location | ||||||||||||||||||||||||||||||||||||||||||
| 384 | 4 | foreach my $loc_key (keys %$location_groups) { | |||||||||||||||||||||||||||||||||||||||||
| 385 | 4 | my $events = $location_groups->{$loc_key}; | |||||||||||||||||||||||||||||||||||||||||
| 386 | 4 | my ($lat, $lon) = split /,/, $loc_key; | |||||||||||||||||||||||||||||||||||||||||
| 387 | |||||||||||||||||||||||||||||||||||||||||||
| 388 | 4 | my $html = _generate_popup_html($events); | |||||||||||||||||||||||||||||||||||||||||
| 389 | |||||||||||||||||||||||||||||||||||||||||||
| 390 | 4 | $osm->add_marker( | |||||||||||||||||||||||||||||||||||||||||
| 391 | point => [$lat, $lon], | ||||||||||||||||||||||||||||||||||||||||||
| 392 | html => $html, | ||||||||||||||||||||||||||||||||||||||||||
| 393 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 394 | } | ||||||||||||||||||||||||||||||||||||||||||
| 395 | |||||||||||||||||||||||||||||||||||||||||||
| 396 | # Find location with most events | ||||||||||||||||||||||||||||||||||||||||||
| 397 | 4 | my ($center_lat, $center_lon) = (0, 0); | |||||||||||||||||||||||||||||||||||||||||
| 398 | 4 | my $max_events = 0; | |||||||||||||||||||||||||||||||||||||||||
| 399 | 4 | foreach my $loc_key (keys %$location_groups) { | |||||||||||||||||||||||||||||||||||||||||
| 400 | 4 | my $event_count = scalar(@{$location_groups->{$loc_key}}); | |||||||||||||||||||||||||||||||||||||||||
| 401 | 4 | ▶ | if ($event_count > $max_events) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 402 | 4 | $max_events = $event_count; | |||||||||||||||||||||||||||||||||||||||||
| 403 | 4 | ($center_lat, $center_lon) = split /,/, $loc_key; | |||||||||||||||||||||||||||||||||||||||||
| 404 | } | ||||||||||||||||||||||||||||||||||||||||||
| 405 | } | ||||||||||||||||||||||||||||||||||||||||||
| 406 | |||||||||||||||||||||||||||||||||||||||||||
| 407 | 4 | $osm->center([$center_lat, $center_lon]); | |||||||||||||||||||||||||||||||||||||||||
| 408 | |||||||||||||||||||||||||||||||||||||||||||
| 409 | 4 | return $osm; | |||||||||||||||||||||||||||||||||||||||||
| 410 | } | ||||||||||||||||||||||||||||||||||||||||||
| 411 | |||||||||||||||||||||||||||||||||||||||||||
| 412 | =head1 AUTHOR | ||||||||||||||||||||||||||||||||||||||||||
| 413 | |||||||||||||||||||||||||||||||||||||||||||
| 414 | Nigel Horne, C<< <njh at nigelhorne.com> >> | ||||||||||||||||||||||||||||||||||||||||||
| 415 | |||||||||||||||||||||||||||||||||||||||||||
| 416 | =head1 BUGS | ||||||||||||||||||||||||||||||||||||||||||
| 417 | |||||||||||||||||||||||||||||||||||||||||||
| 418 | =head1 SEE ALSO | ||||||||||||||||||||||||||||||||||||||||||
| 419 | |||||||||||||||||||||||||||||||||||||||||||
| 420 | =over 4 | ||||||||||||||||||||||||||||||||||||||||||
| 421 | |||||||||||||||||||||||||||||||||||||||||||
| 422 | =item * Test coverage report: L<https://nigelhorne.github.io/HTML-Genealogy-Map/coverage/> | ||||||||||||||||||||||||||||||||||||||||||
| 423 | |||||||||||||||||||||||||||||||||||||||||||
| 424 | =item * L<Object::Configure> | ||||||||||||||||||||||||||||||||||||||||||
| 425 | |||||||||||||||||||||||||||||||||||||||||||
| 426 | The class is fully configurable at runtime with configuration files. | ||||||||||||||||||||||||||||||||||||||||||
| 427 | |||||||||||||||||||||||||||||||||||||||||||
| 428 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 429 | |||||||||||||||||||||||||||||||||||||||||||
| 430 | =head1 REPOSITORY | ||||||||||||||||||||||||||||||||||||||||||
| 431 | |||||||||||||||||||||||||||||||||||||||||||
| 432 | L<https://github.com/nigelhorne/HTML-Genealogy-Map> | ||||||||||||||||||||||||||||||||||||||||||
| 433 | |||||||||||||||||||||||||||||||||||||||||||
| 434 | =head1 SUPPORT | ||||||||||||||||||||||||||||||||||||||||||
| 435 | |||||||||||||||||||||||||||||||||||||||||||
| 436 | This module is provided as-is without any warranty. | ||||||||||||||||||||||||||||||||||||||||||
| 437 | |||||||||||||||||||||||||||||||||||||||||||
| 438 | Please report any bugs or feature requests to C<bug-html-genealogy-map at rt.cpan.org>, | ||||||||||||||||||||||||||||||||||||||||||
| 439 | or through the web interface at | ||||||||||||||||||||||||||||||||||||||||||
| 440 | L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTML-Genealogy-Map>. | ||||||||||||||||||||||||||||||||||||||||||
| 441 | I will be notified, and then you'll | ||||||||||||||||||||||||||||||||||||||||||
| 442 | automatically be notified of progress on your bug as I make changes. | ||||||||||||||||||||||||||||||||||||||||||
| 443 | |||||||||||||||||||||||||||||||||||||||||||
| 444 | You can find documentation for this module with the perldoc command. | ||||||||||||||||||||||||||||||||||||||||||
| 445 | |||||||||||||||||||||||||||||||||||||||||||
| 446 | perldoc HTML::Genalogy::Map | ||||||||||||||||||||||||||||||||||||||||||
| 447 | |||||||||||||||||||||||||||||||||||||||||||
| 448 | You can also look for information at: | ||||||||||||||||||||||||||||||||||||||||||
| 449 | |||||||||||||||||||||||||||||||||||||||||||
| 450 | =over 4 | ||||||||||||||||||||||||||||||||||||||||||
| 451 | |||||||||||||||||||||||||||||||||||||||||||
| 452 | =item * MetaCPAN | ||||||||||||||||||||||||||||||||||||||||||
| 453 | |||||||||||||||||||||||||||||||||||||||||||
| 454 | L<https://metacpan.org/dist/HTML-Genealogy-Map> | ||||||||||||||||||||||||||||||||||||||||||
| 455 | |||||||||||||||||||||||||||||||||||||||||||
| 456 | =item * RT: CPAN's request tracker | ||||||||||||||||||||||||||||||||||||||||||
| 457 | |||||||||||||||||||||||||||||||||||||||||||
| 458 | L<https://rt.cpan.org/NoAuth/Bugs.html?Dist=HTML-Genealogy-Map> | ||||||||||||||||||||||||||||||||||||||||||
| 459 | |||||||||||||||||||||||||||||||||||||||||||
| 460 | =item * CPAN Testers' Matrix | ||||||||||||||||||||||||||||||||||||||||||
| 461 | |||||||||||||||||||||||||||||||||||||||||||
| 462 | L<http://matrix.cpantesters.org/?dist=HTML-Genealogy-Map> | ||||||||||||||||||||||||||||||||||||||||||
| 463 | |||||||||||||||||||||||||||||||||||||||||||
| 464 | =item * CPAN Testers Dependencies | ||||||||||||||||||||||||||||||||||||||||||
| 465 | |||||||||||||||||||||||||||||||||||||||||||
| 466 | L<http://deps.cpantesters.org/?module=HTML::Genalogy::Map> | ||||||||||||||||||||||||||||||||||||||||||
| 467 | |||||||||||||||||||||||||||||||||||||||||||
| 468 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 469 | |||||||||||||||||||||||||||||||||||||||||||
| 470 | =head1 LICENCE AND COPYRIGHT | ||||||||||||||||||||||||||||||||||||||||||
| 471 | |||||||||||||||||||||||||||||||||||||||||||
| 472 | Copyright 2025 Nigel Horne. | ||||||||||||||||||||||||||||||||||||||||||
| 473 | |||||||||||||||||||||||||||||||||||||||||||
| 474 | Usage is subject to licence terms. | ||||||||||||||||||||||||||||||||||||||||||
| 475 | |||||||||||||||||||||||||||||||||||||||||||
| 476 | The licence terms of this software are as follows: | ||||||||||||||||||||||||||||||||||||||||||
| 477 | |||||||||||||||||||||||||||||||||||||||||||
| 478 | =over 4 | ||||||||||||||||||||||||||||||||||||||||||
| 479 | |||||||||||||||||||||||||||||||||||||||||||
| 480 | =item * Personal single user, single computer use: GPL2 | ||||||||||||||||||||||||||||||||||||||||||
| 481 | |||||||||||||||||||||||||||||||||||||||||||
| 482 | =item * All other users (including Commercial, Charity, Educational, Government) | ||||||||||||||||||||||||||||||||||||||||||
| 483 | must apply in writing for a licence for use from Nigel Horne at the | ||||||||||||||||||||||||||||||||||||||||||
| 484 | above e-mail. | ||||||||||||||||||||||||||||||||||||||||||
| 485 | |||||||||||||||||||||||||||||||||||||||||||
| 486 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 487 | |||||||||||||||||||||||||||||||||||||||||||
| 488 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 489 | |||||||||||||||||||||||||||||||||||||||||||
| 490 | 3 | 1; | |||||||||||||||||||||||||||||||||||||||||