« blib/lib/Ftree/DataParsers/DBIFormat.pm
↑ Summary
lib/Ftree/DataParsers/ExtendedSimonWardFormat.pm »
| 1 | package Ftree::PersonPage; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 3 | 2 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||
| 5 | 2 | ▶ | use version; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | 2 | our $VERSION = qv('2.3.41'); | |||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||
| 8 | 2 | ▶ | use Ftree::FamilyTreeBase; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | 2 | ▶ | use Sub::Exporter -setup => { exports => [ qw(new main) ] }; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 10 | 2 | ▶ | use Params::Validate qw(:all); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 11 | 2 | ▶ | use Encode qw(decode_utf8); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 12 | 2 | my $q = new CGI; | |||||||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||||||
| 14 | 2 | ▶ | use base 'Ftree::FamilyTreeBase'; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||||
| 16 | 0 | ▶ | sub new{ | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 17 | 0 | my $type = shift; | |||||||||||||||||||||||||||||||||||||||||
| 18 | 0 | my $self = $type->SUPER::new(@_); | |||||||||||||||||||||||||||||||||||||||||
| 19 | 0 | $self->{target_person} = undef; | |||||||||||||||||||||||||||||||||||||||||
| 20 | 0 | return $self; | |||||||||||||||||||||||||||||||||||||||||
| 21 | } | ||||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||
| 23 | 0 | ▶ | sub main{ | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
main: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 24 | 0 | my ($self) = validate_pos( @_, { type => HASHREF } ); | |||||||||||||||||||||||||||||||||||||||||
| 25 | 0 | $self->_set_target(); | |||||||||||||||||||||||||||||||||||||||||
| 26 | 0 | $self->_target_check(); | |||||||||||||||||||||||||||||||||||||||||
| 27 | 0 | $self->_password_check(); | |||||||||||||||||||||||||||||||||||||||||
| 28 | 0 | $self->{imgwidth} = 240; | |||||||||||||||||||||||||||||||||||||||||
| 29 | 0 | $self->{imgheight} = $self->{imgwidth} * 1.5; | |||||||||||||||||||||||||||||||||||||||||
| 30 | 0 | $self->_draw_single_person_page(); | |||||||||||||||||||||||||||||||||||||||||
| 31 | 0 | $self->_endpage(); | |||||||||||||||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||||||||||||||||
| 33 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||||||||||||||||
| 35 | ####################################################### | ||||||||||||||||||||||||||||||||||||||||||
| 36 | # processing the parameters (type and passwd) | ||||||||||||||||||||||||||||||||||||||||||
| 37 | 0 | ▶ | sub _set_target { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_set_target: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 38 | 0 | my ($self) = validate_pos( @_, { type => HASHREF } ); | |||||||||||||||||||||||||||||||||||||||||
| 39 | 0 | $self->SUPER::_process_parameters(); | |||||||||||||||||||||||||||||||||||||||||
| 40 | 0 | my $id = decode_utf8( CGI::param('target') ); | |||||||||||||||||||||||||||||||||||||||||
| 41 | my $family_tree_data = | ||||||||||||||||||||||||||||||||||||||||||
| 42 | 0 | Ftree::FamilyTreeDataFactory::getFamilyTree( $self->{settings}{data_source} ); | |||||||||||||||||||||||||||||||||||||||||
| 43 | 0 | $self->{target_person} = $family_tree_data->get_person($id); | |||||||||||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||||||||||
| 45 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||
| 48 | ####################################################### | ||||||||||||||||||||||||||||||||||||||||||
| 49 | # check if target person exists in database | ||||||||||||||||||||||||||||||||||||||||||
| 50 | 0 | ▶ | sub _target_check { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_target_check: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||
| 51 | 0 | my ($self) = validate_pos( @_, { type => HASHREF } ); | |||||||||||||||||||||||||||||||||||||||||
| 52 | 0 | ▶ | if ( !defined $self->{target_person} ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 53 | 0 | my $title = $self->{textGenerator}->noDataAbout( CGI::param('target') ); | |||||||||||||||||||||||||||||||||||||||||
| 54 | 0 | $self->_toppage($title); | |||||||||||||||||||||||||||||||||||||||||
| 55 | 0 | print $q->br, $title, $q->br, "\n"; | |||||||||||||||||||||||||||||||||||||||||
| 56 | 0 | $self->_endpage(); | |||||||||||||||||||||||||||||||||||||||||
| 57 | 0 | exit 1; | |||||||||||||||||||||||||||||||||||||||||
| 58 | } | ||||||||||||||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||||||||||||||
| 60 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 61 | } | ||||||||||||||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||||||||||||||
| 63 | 0 | ▶ | sub _draw_row { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_draw_row: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||
| 64 | 0 | my ( $self, $key, $value ) = validate_pos( | |||||||||||||||||||||||||||||||||||||||||
| 65 | @_, | ||||||||||||||||||||||||||||||||||||||||||
| 66 | { type => HASHREF }, | ||||||||||||||||||||||||||||||||||||||||||
| 67 | { type => SCALAR }, | ||||||||||||||||||||||||||||||||||||||||||
| 68 | { type => SCALAR | UNDEF } | ||||||||||||||||||||||||||||||||||||||||||
| 69 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 70 | 0 | ▶ | return unless defined $value; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||||||||||||||||
| 72 | 0 | print $q->start_Tr, $q->td( $q->strong( $self->{textGenerator}->{$key} ) ); | |||||||||||||||||||||||||||||||||||||||||
| 73 | 0 | print $q->td($value), $q->end_Tr, "\n"; | |||||||||||||||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||||||||||||||||
| 75 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 76 | } | ||||||||||||||||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||||||||||||||||
| 78 | 0 | ▶ | sub _draw_pictures { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_draw_pictures: not called CC=5 SCAR=34.0
| |||||||||||||||||||||||||||||||||||||||||||
| 79 | 0 | my ( $self, $the_person ) = | |||||||||||||||||||||||||||||||||||||||||
| 80 | validate_pos( @_, { type => HASHREF }, { type => SCALARREF } ); | ||||||||||||||||||||||||||||||||||||||||||
| 81 | 0 | my $column_number = 3; | |||||||||||||||||||||||||||||||||||||||||
| 82 | 0 | my $index = 0; | |||||||||||||||||||||||||||||||||||||||||
| 83 | 0 | print $q->hr, $q->h3('Image gallery'), | |||||||||||||||||||||||||||||||||||||||||
| 84 | $q->br, $q->start_table( { -align => 'center' } ); | ||||||||||||||||||||||||||||||||||||||||||
| 85 | 0 | foreach my $picture ( @{ $the_person->{pictures} } ) { | |||||||||||||||||||||||||||||||||||||||||
| 86 | 0 | print "\n"; | |||||||||||||||||||||||||||||||||||||||||
| 87 | 0 | ▶ | print $q->start_Tr() if ( $index % $column_number == 0 ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 88 | print $q->start_td( { -width => 220 } ), | ||||||||||||||||||||||||||||||||||||||||||
| 89 | $q->a( | ||||||||||||||||||||||||||||||||||||||||||
| 90 | { -href => $picture->{file_name} }, | ||||||||||||||||||||||||||||||||||||||||||
| 91 | $q->img( | ||||||||||||||||||||||||||||||||||||||||||
| 92 | { | ||||||||||||||||||||||||||||||||||||||||||
| 93 | -width => 200, | ||||||||||||||||||||||||||||||||||||||||||
| 94 | -src => $picture->{file_name}, | ||||||||||||||||||||||||||||||||||||||||||
| 95 | -alt => $picture->{comment} | ||||||||||||||||||||||||||||||||||||||||||
| 96 | } | ||||||||||||||||||||||||||||||||||||||||||
| 97 | ) | ||||||||||||||||||||||||||||||||||||||||||
| 98 | ), | ||||||||||||||||||||||||||||||||||||||||||
| 99 | $q->br, | ||||||||||||||||||||||||||||||||||||||||||
| 100 | 0 | $picture->{comment}, $q->end_td; | |||||||||||||||||||||||||||||||||||||||||
| 101 | 0 | ▶ | print $q->end_Tr() | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 102 | if ( ( $index % $column_number ) == $column_number - 1 ); | ||||||||||||||||||||||||||||||||||||||||||
| 103 | 0 | ++$index; | |||||||||||||||||||||||||||||||||||||||||
| 104 | } | ||||||||||||||||||||||||||||||||||||||||||
| 105 | 0 | ▶ | print $q->end_Tr(), "\n" if ( ( $index % $column_number ) != 0 ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 106 | 0 | print $q->br, $q->end_table(), $q->br; | |||||||||||||||||||||||||||||||||||||||||
| 107 | |||||||||||||||||||||||||||||||||||||||||||
| 108 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 109 | } | ||||||||||||||||||||||||||||||||||||||||||
| 110 | |||||||||||||||||||||||||||||||||||||||||||
| 111 | 0 | ▶ | sub _draw_single_person_page { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_draw_single_person_page: not called CC=16 SCAR=56.1
| |||||||||||||||||||||||||||||||||||||||||||
| 112 | 0 | my ($self) = validate_pos( @_, { type => HASHREF } ); | |||||||||||||||||||||||||||||||||||||||||
| 113 | 0 | binmode STDOUT, ":encoding(UTF-8)"; | |||||||||||||||||||||||||||||||||||||||||
| 114 | 0 | $self->_toppage( $self->{target_person}->get_name()->get_long_name() ); | |||||||||||||||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||||||||||||||||
| 116 | 0 | print $q->start_center; | |||||||||||||||||||||||||||||||||||||||||
| 117 | 0 | $self->_print_zoom_buttons(); | |||||||||||||||||||||||||||||||||||||||||
| 118 | 0 | print $self->html_img( $self->{target_person} ), $q->br, "\n"; | |||||||||||||||||||||||||||||||||||||||||
| 119 | print $self->{target_person}->get_date_of_birth()->format() | ||||||||||||||||||||||||||||||||||||||||||
| 120 | 0 | ▶ | if ( defined $self->{target_person}->get_date_of_birth() ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 121 | 0 | print " - "; | |||||||||||||||||||||||||||||||||||||||||
| 122 | print $self->{target_person}->get_date_of_death()->format() | ||||||||||||||||||||||||||||||||||||||||||
| 123 | 0 | ▶ | if ( defined $self->{target_person}->get_date_of_death() ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 124 | 0 | print $q->end_center, "\n"; | |||||||||||||||||||||||||||||||||||||||||
| 125 | |||||||||||||||||||||||||||||||||||||||||||
| 126 | 0 | print $q->br, $q->start_table( { -cellspacing => 2, -cellpadding => 2 } ); | |||||||||||||||||||||||||||||||||||||||||
| 127 | $self->_draw_row( 'nickname', | ||||||||||||||||||||||||||||||||||||||||||
| 128 | $self->{target_person}->get_name()->get_nickname() ) | ||||||||||||||||||||||||||||||||||||||||||
| 129 | 0 | ▶ | if ( defined $self->{target_person}->get_name()->get_nickname() ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 130 | $self->_draw_row( "place_of_birth", | ||||||||||||||||||||||||||||||||||||||||||
| 131 | $self->{target_person}->get_place_of_birth()->toString() ) | ||||||||||||||||||||||||||||||||||||||||||
| 132 | 0 | ▶ | if ( defined $self->{target_person}->get_place_of_birth() ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 133 | $self->_draw_row( "place_of_death", | ||||||||||||||||||||||||||||||||||||||||||
| 134 | $self->{target_person}->get_place_of_death()->toString() ) | ||||||||||||||||||||||||||||||||||||||||||
| 135 | 0 | ▶ | if ( defined $self->{target_person}->get_place_of_death() ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 136 | $self->_draw_row( "cemetery", | ||||||||||||||||||||||||||||||||||||||||||
| 137 | $self->{target_person}->get_cemetery()->toString() ) | ||||||||||||||||||||||||||||||||||||||||||
| 138 | 0 | ▶ | if ( defined $self->{target_person}->get_cemetery() ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 139 | $self->_draw_row( "schools", | ||||||||||||||||||||||||||||||||||||||||||
| 140 | 0 | join( ', ', @{ $self->{target_person}->get_schools() } ) ) | |||||||||||||||||||||||||||||||||||||||||
| 141 | 0 | ▶ | if ( defined $self->{target_person}->get_schools() ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 142 | $self->_draw_row( "jobs", | ||||||||||||||||||||||||||||||||||||||||||
| 143 | 0 | join( ', ', @{ $self->{target_person}->get_jobs() } ) ) | |||||||||||||||||||||||||||||||||||||||||
| 144 | 0 | ▶ | if ( defined $self->{target_person}->get_jobs() ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 145 | $self->_draw_row( "work_places", | ||||||||||||||||||||||||||||||||||||||||||
| 146 | 0 | join( ', ', @{ $self->{target_person}->get_work_places() } ) ) | |||||||||||||||||||||||||||||||||||||||||
| 147 | 0 | ▶ | if ( defined $self->{target_person}->get_work_places() ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 148 | $self->_draw_row( | ||||||||||||||||||||||||||||||||||||||||||
| 149 | "places_of_living", | ||||||||||||||||||||||||||||||||||||||||||
| 150 | join( ', ', | ||||||||||||||||||||||||||||||||||||||||||
| 151 | 0 | map { $_->toString() } | |||||||||||||||||||||||||||||||||||||||||
| 152 | 0 | @{ $self->{target_person}->get_places_of_living() } ) | |||||||||||||||||||||||||||||||||||||||||
| 153 | 0 | ▶ | ) if ( defined $self->{target_person}->get_places_of_living() ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 154 | |||||||||||||||||||||||||||||||||||||||||||
| 155 | $self->_draw_row( | ||||||||||||||||||||||||||||||||||||||||||
| 156 | "father", | ||||||||||||||||||||||||||||||||||||||||||
| 157 | $self->aref_tree( | ||||||||||||||||||||||||||||||||||||||||||
| 158 | $self->{target_person}->get_father()->get_name()->get_long_name(), | ||||||||||||||||||||||||||||||||||||||||||
| 159 | $self->{target_person}->get_father(), 0 | ||||||||||||||||||||||||||||||||||||||||||
| 160 | ) | ||||||||||||||||||||||||||||||||||||||||||
| 161 | 0 | ▶ | ) if ( defined $self->{target_person}->get_father() ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 162 | $self->_draw_row( | ||||||||||||||||||||||||||||||||||||||||||
| 163 | "mother", | ||||||||||||||||||||||||||||||||||||||||||
| 164 | $self->aref_tree( | ||||||||||||||||||||||||||||||||||||||||||
| 165 | $self->{target_person}->get_mother()->get_name()->get_long_name(), | ||||||||||||||||||||||||||||||||||||||||||
| 166 | $self->{target_person}->get_mother(), 0 | ||||||||||||||||||||||||||||||||||||||||||
| 167 | ) | ||||||||||||||||||||||||||||||||||||||||||
| 168 | 0 | ▶ | ) if ( defined $self->{target_person}->get_mother() ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 169 | 0 | my @spouses = $self->{target_person}->get_spouses(); | |||||||||||||||||||||||||||||||||||||||||
| 170 | my $spouse_type = | ||||||||||||||||||||||||||||||||||||||||||
| 171 | 0 | ▶ | $self->{target_person}->get_gender() == 0 ? "wives" : "husbands"; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 172 | 0 | $self->_print_people_list( $spouse_type, \@spouses ); | |||||||||||||||||||||||||||||||||||||||||
| 173 | 0 | my @siblings = $self->{target_person}->get_peers(); | |||||||||||||||||||||||||||||||||||||||||
| 174 | 0 | ▶ | $self->_print_people_list( "siblings", \@siblings ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 175 | if ( @siblings > 1 ); | ||||||||||||||||||||||||||||||||||||||||||
| 176 | |||||||||||||||||||||||||||||||||||||||||||
| 177 | 0 | my @peers_on_father = $self->{target_person}->get_soft_peers('father'); | |||||||||||||||||||||||||||||||||||||||||
| 178 | 0 | $self->_print_people_list( "siblings_on_father", \@peers_on_father ); | |||||||||||||||||||||||||||||||||||||||||
| 179 | 0 | my @peers_on_mother = $self->{target_person}->get_soft_peers('mother'); | |||||||||||||||||||||||||||||||||||||||||
| 180 | 0 | $self->_print_people_list( "siblings_on_mother", \@peers_on_mother ); | |||||||||||||||||||||||||||||||||||||||||
| 181 | $self->_print_people_list( "children", | ||||||||||||||||||||||||||||||||||||||||||
| 182 | $self->{target_person}->get_children() ) | ||||||||||||||||||||||||||||||||||||||||||
| 183 | 0 | ▶ | if ( defined $self->{target_person}->get_children() ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 184 | |||||||||||||||||||||||||||||||||||||||||||
| 185 | 0 | $self->_draw_row( "email", $self->{target_person}->get_email() ); | |||||||||||||||||||||||||||||||||||||||||
| 186 | 0 | $self->_draw_row( "homepage", $self->{target_person}->get_homepage() ); | |||||||||||||||||||||||||||||||||||||||||
| 187 | 0 | $self->_draw_row( "general", $self->{target_person}->get_general() ); | |||||||||||||||||||||||||||||||||||||||||
| 188 | |||||||||||||||||||||||||||||||||||||||||||
| 189 | 0 | print $q->end_table; | |||||||||||||||||||||||||||||||||||||||||
| 190 | |||||||||||||||||||||||||||||||||||||||||||
| 191 | # $self->draw_pictures($self->{target_person}) | ||||||||||||||||||||||||||||||||||||||||||
| 192 | # if(defined $self->{target_person}->{pictures}) | ||||||||||||||||||||||||||||||||||||||||||
| 193 | |||||||||||||||||||||||||||||||||||||||||||
| 194 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 195 | } | ||||||||||||||||||||||||||||||||||||||||||
| 196 | |||||||||||||||||||||||||||||||||||||||||||
| 197 | 0 | ▶ | sub _print_zoom_buttons { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_print_zoom_buttons: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 198 | 0 | my ($self) = validate_pos( @_, { type => HASHREF } ); | |||||||||||||||||||||||||||||||||||||||||
| 199 | 0 | my $lev_plus1 = 2; | |||||||||||||||||||||||||||||||||||||||||
| 200 | |||||||||||||||||||||||||||||||||||||||||||
| 201 | 0 | print $q->start_table( | |||||||||||||||||||||||||||||||||||||||||
| 202 | { -border => "0", -cellpadding => "0", -cellspacing => "2" } ), "\n", | ||||||||||||||||||||||||||||||||||||||||||
| 203 | $q->start_Tr; | ||||||||||||||||||||||||||||||||||||||||||
| 204 | print $q->start_td( { -align => "center" } ), "\n", | ||||||||||||||||||||||||||||||||||||||||||
| 205 | $self->aref_tree( | ||||||||||||||||||||||||||||||||||||||||||
| 206 | $q->img( | ||||||||||||||||||||||||||||||||||||||||||
| 207 | { | ||||||||||||||||||||||||||||||||||||||||||
| 208 | -src => "$self->{graphicsUrl}/zoomout.gif", | ||||||||||||||||||||||||||||||||||||||||||
| 209 | -alt => $self->{textGenerator}->ZoomOut($lev_plus1) | ||||||||||||||||||||||||||||||||||||||||||
| 210 | } | ||||||||||||||||||||||||||||||||||||||||||
| 211 | ), | ||||||||||||||||||||||||||||||||||||||||||
| 212 | $self->{target_person}, | ||||||||||||||||||||||||||||||||||||||||||
| 213 | 0 | $lev_plus1 | |||||||||||||||||||||||||||||||||||||||||
| 214 | ), | ||||||||||||||||||||||||||||||||||||||||||
| 215 | $q->end_td, $q->end_Tr, "\n", | ||||||||||||||||||||||||||||||||||||||||||
| 216 | $q->end_table, $q->br, $q->br, "\n"; | ||||||||||||||||||||||||||||||||||||||||||
| 217 | |||||||||||||||||||||||||||||||||||||||||||
| 218 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 219 | } | ||||||||||||||||||||||||||||||||||||||||||
| 220 | |||||||||||||||||||||||||||||||||||||||||||
| 221 | 0 | ▶ | sub _print_people_list { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_print_people_list: not called CC=7 SCAR=40.3
| |||||||||||||||||||||||||||||||||||||||||||
| 222 | 0 | my ( $self, $people_type, $people_array_r ) = validate_pos( | |||||||||||||||||||||||||||||||||||||||||
| 223 | @_, | ||||||||||||||||||||||||||||||||||||||||||
| 224 | { type => HASHREF }, | ||||||||||||||||||||||||||||||||||||||||||
| 225 | { type => SCALAR }, | ||||||||||||||||||||||||||||||||||||||||||
| 226 | { type => ARRAYREF } | ||||||||||||||||||||||||||||||||||||||||||
| 227 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 228 | 0 | ▶ | if ( defined $people_array_r && @{$people_array_r} > 0 ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $people_array_r and @{$people_array_r;} > 0
MC/DC0%0/2
defined $people_array_r and @{$people_array_r;} > 0
defined $people_array_r
@{$people_array_r;} > 0
Truth table0%0/3
A and B
A= defined $people_array_rB= @{$people_array_r;} > 0
| |||||||||||||||||||||||||||||||||||||||||||
| 229 | print $q->start_Tr, | ||||||||||||||||||||||||||||||||||||||||||
| 230 | 0 | $q->td( $q->strong( $self->{textGenerator}->{$people_type} ) ), | |||||||||||||||||||||||||||||||||||||||||
| 231 | $q->start_td; | ||||||||||||||||||||||||||||||||||||||||||
| 232 | |||||||||||||||||||||||||||||||||||||||||||
| 233 | 0 | foreach my $person ( @{$people_array_r} ) { | |||||||||||||||||||||||||||||||||||||||||
| 234 | 0 | ▶ | if ( $person != $self->{target_person} | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$person != $self->{"target_person"} and $person != $Ftree::Person::unknown_male and $person != $Ftree::Person::unknown_female
$person != $self->{"target_person"} and $person != $Ftree::Person::unknown_male
MC/DC0%0/3
$person != $self->{"target_person"} and $person != $Ftree::Person::unknown_male and $person != $Ftree::Person::unknown_female
$person != $self->{"target_person"}
$person != $Ftree::Person::unknown_male
$person != $Ftree::Person::unknown_female
Truth table0%0/4
A and B and C
A= $person != $self->{"target_person"}B= $person != $Ftree::Person::unknown_maleC= $person != $Ftree::Person::unknown_female
| |||||||||||||||||||||||||||||||||||||||||||
| 235 | && $person != $Ftree::Person::unknown_male | ||||||||||||||||||||||||||||||||||||||||||
| 236 | && $person != $Ftree::Person::unknown_female ) | ||||||||||||||||||||||||||||||||||||||||||
| 237 | { | ||||||||||||||||||||||||||||||||||||||||||
| 238 | 0 | print $self->aref_tree( $person->get_name()->get_full_name(), | |||||||||||||||||||||||||||||||||||||||||
| 239 | $person, 0 ), | ||||||||||||||||||||||||||||||||||||||||||
| 240 | ", "; | ||||||||||||||||||||||||||||||||||||||||||
| 241 | } | ||||||||||||||||||||||||||||||||||||||||||
| 242 | } | ||||||||||||||||||||||||||||||||||||||||||
| 243 | 0 | print $q->end_td, $q->end_Tr; | |||||||||||||||||||||||||||||||||||||||||
| 244 | } | ||||||||||||||||||||||||||||||||||||||||||
| 245 | |||||||||||||||||||||||||||||||||||||||||||
| 246 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 247 | } | ||||||||||||||||||||||||||||||||||||||||||
| 248 | |||||||||||||||||||||||||||||||||||||||||||
| 249 | 2 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 250 | |||||||||||||||||||||||||||||||||||||||||||