lib/Ftree/FamilyTreeInfo.pm

filter: Statementstmt 17.9% 37 / 206 Branchbran 0.0% 0 / 40 Conditioncond 0.0% 0 / 18 MC/DCmcdc 0.0% 0 / 10 Subroutinesub 50.0% 11 / 22 Podpod 0.0% 0 / 2 totaltotal 16.1% 48 / 298 CC 36 SCAR 40.0
CC
36
Cov
14%
_draw_surname_page
110.0
_draw_facehall_page
110.0
_draw_birthday_page
72.0
CRAP 54.7
« lib/Ftree/DataParsers/ExtendedSimonWardFormat.pm ↑ Summary lib/Ftree/FamilyTreeData.pm »
1 package Ftree::FamilyTreeInfo;
2
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5
6 2 ▶use Ftree::FamilyTreeBase;
Subroutine BEGIN: called CC=1 SCAR=0.0
7
8 2 ▶use v5.10.1;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use experimental 'smartmatch';
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 Sub::Exporter -setup => { exports => [qw(new main)] };
Subroutine BEGIN: called CC=1 SCAR=0.0
12 2 ▶use Encode qw(decode_utf8);
Subroutine BEGIN: called CC=1 SCAR=0.0
13 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
14
15 2 our $VERSION = '2.3.41';
16
17 2 my $q = new CGI;
18
19 2 ▶use base 'Ftree::FamilyTreeBase';
Subroutine BEGIN: called CC=1 SCAR=0.0
20
21 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
22 1 my $type = shift;
23 1 my $self = $type->SUPER::new(@_);
24 $self->{family_tree_data} =
25 Ftree::FamilyTreeDataFactory::getFamilyTree(
26 1 $self->{settings}{data_source} );
27 1 $self->{pagetype} = undef;
28 1 return $self;
29 }
30
31 0 ▶sub main {
Subroutine main: not called CC=2 SCAR=17.9
Pod undocumented
32 0 my ($self) = validate_pos( @_, { type => HASHREF } );
33 0 $self->_process_parameters();
34 0 $self->SUPER::_password_check();
35
36 0 for ( $self->{pagetype} ) {
37 0 when (/^$/) { $self->_draw_index_page(); }
38 0 when (/subfamily/) { $self->_draw_same_surname_page(); }
39 0 when (/snames/) { $self->_draw_surname_page(); }
40 0 when (/faces/) { $self->_draw_facehall_page(); }
41 0 when (/emails/) {
42 $self->_draw_general_page(
43 \&Ftree::Person::get_email, 'email',
44 $self->{textGenerator}->{Emails},
45 $self->{textGenerator}->{Total_with_email}
46 0 );
47 }
48 0 when (/hpages/) {
49 $self->_draw_general_page(
50 \&Ftree::Person::get_homepage,
51 'homepage',
52 $self->{textGenerator}->{Homepages},
53 $self->{textGenerator}->{Total_with_homepage}
54 0 );
55 }
56 0 when (/bdays/) { $self->_draw_birthday_page(); }
57 0 default { $self->_draw_invalid_page(); }
58 }
59
60 0 return;
61 }
62
63 #######################################################
64 # processing the parameters (type and passwd)
65 0 ▶sub _process_parameters {
Subroutine _process_parameters: not called CC=2 SCAR=17.9
66 0 my ($self) = validate_pos( @_, { type => HASHREF } );
67 0 $self->SUPER::_process_parameters();
68 0 $self->{pagetype} = $self->{cgi}->param('type');
69 0 ▶ $self->{pagetype} = "" unless ( defined $self->{pagetype} );
Branch: 1 branch
BranchTrueFalseTotal
unless defined $self->{"pagetype"} 0 0 0
70
71 0 return;
72 }
73
74 # private functions
75 0 ▶sub _draw_people_table {
Subroutine _draw_people_table: not called CC=6 SCAR=37.4
76 0 my ( $self, $people, $column_number ) = validate_pos(
77 @_,
78 { type => HASHREF },
79 { type => ARRAYREF },
80 { defaulf => 5 }
81 );
82 0 ▶ $column_number = 5 unless defined $column_number; #AAARRRRGGGHHH
Branch: 1 branch
BranchTrueFalseTotal
unless defined $column_number 0 0 0
83 0 my $nr_of_man = 0;
84 0 my $nr_of_woman = 0;
85 print $self->{cgi}->start_table(
86 0 { -cellpadding => '5', -border => '1', -align => 'center' } ), "\n";
87
88 0 for my $index ( 0 .. @{$people} - 1 ) {
89 0 ▶ print $self->{cgi}->start_Tr() if ( $index % $column_number == 0 );
Branch: 1 branch
BranchTrueFalseTotal
if $index % $column_number == 0 0 0 0
90 0 my $class = $self->get_cell_class( $people->[$index], \$nr_of_man,
91 \$nr_of_woman );
92 print $self->{cgi}->td(
93 0 { -class => $class },
94 $self->aref_tree(
95 $people->[$index]->get_name()->get_long_name(),
96 $people->[$index]
97 )
98 ),
99 "\n";
100 print $self->{cgi}->end_Tr()
101 0 ▶ if ( ( $index % $column_number ) == $column_number - 1 );
Branch: 1 branch
BranchTrueFalseTotal
if $index % $column_number == $column_number - 1 0 0 0
102 }
103 print $self->{cgi}->end_Tr(), "\n"
104 0 ▶ if ( ( @{$people} % $column_number ) != 1 );
Branch: 1 branch
BranchTrueFalseTotal
if @{$people;} % $column_number != 1 0 0 0
105
106 print $self->{cgi}->end_table(), "\n", $self->{cgi}->br,
107 0 $self->{textGenerator}->summary( scalar( @{$people} ) ),
108 " ($self->{textGenerator}{man}: ", $nr_of_man,
109 ", $self->{textGenerator}{woman}: ", $nr_of_woman,
110 ", $self->{textGenerator}{unknown}: ",
111 0 scalar( @{$people} ) - $nr_of_man - $nr_of_woman, ')';
112
113 0 return;
114 }
115 #########################################################
116 # INDEX PAGE
117 #########################################################
118 0 ▶sub _draw_index_page {
Subroutine _draw_index_page: not called CC=1 SCAR=6.9
119 0 my ( $self, $column_number ) = validate_pos( @_,
120 { type => HASHREF }, { type => SCALAR, optional => 1 } );
121 0 my @people = grep { defined $_->get_name() }
122 0 $self->{family_tree_data}->get_all_people();
123 @people = sort {
124 0 $a->get_name()->get_full_name() cmp $b->get_name()->get_full_name()
125 } @people;
126 0 $self->_toppage( $self->{textGenerator}->{members} );
127 0 $self->_draw_people_table( \@people, $column_number );
128 0 $self->_endpage();
129
130 0 return;
131 }
132
133 #########################################################
134 # Same surname people
135 #########################################################
136 0 ▶sub _draw_same_surname_page {
Subroutine _draw_same_surname_page: not called CC=3 SCAR=24.8
137 0 my ( $self, $column_number ) = validate_pos( @_,
138 { type => HASHREF }, { type => SCALAR, optional => 1 } );
139 0 my $surname = decode_utf8( $self->{cgi}->param('surname') );
140 0 ▶ $surname = "" unless ( defined $surname );
Branch: 1 branch
BranchTrueFalseTotal
unless defined $surname 0 0 0
141 my @people = grep {
142 0 ▶ defined $_->get_name()
Condition0%0/3
defined $_->get_name && $_->get_name->get_last_name eq $surname
!ll&&!rl&&r
000
MC/DC0%0/2
defined $_->get_name && $_->get_name->get_last_name eq $surname
defined $_->get_name $_->get_name->get_last_name eq $surname
Truth table0%0/3
A && B
A= defined $_->get_nameB= $_->get_name->get_last_name eq $surname
ABresult
0X0
100
111
143 && $_->get_name()->get_last_name() eq $surname
144 0 } $self->{family_tree_data}->get_all_people();
145
146 @people = sort {
147 0 $a->get_name()->get_full_name() cmp $b->get_name()->get_full_name()
148 } (@people);
149 0 $self->_toppage( $self->{textGenerator}->People_with_surname($surname) );
150 0 $self->_draw_people_table( \@people, $column_number );
151 0 $self->_endpage();
152
153 0 return;
154 }
155
156 #########################################################
157 # SURNAME PAGE
158 #########################################################
159 0 ▶sub _draw_surname_page {
Subroutine _draw_surname_page: not called CC=10 SCAR=47.0
160 0 my ( $self, $column_number ) = validate_pos( @_,
161 { type => HASHREF }, { type => SCALAR, optional => 1 } );
162 0 ▶ $column_number = 8 unless ( defined $column_number );
Branch: 1 branch
BranchTrueFalseTotal
unless defined $column_number 0 0 0
163
164 0 require Set::Scalar;
165 0 my $last_name_set = Set::Scalar->new;
166 0 for my $person ( $self->{family_tree_data}->get_all_people() ) {
167 0 ▶ $last_name_set->insert( $person->get_name()->get_last_name() )
Branch: 1 branch
BranchTrueFalseTotal
if defined $person->get_name and defined $person->get_name->get_last_name 0 0 0
Condition0%0/3
defined $person->get_name and defined $person->get_name->get_last_name
!ll&&!rl&&r
000
MC/DC0%0/2
defined $person->get_name and defined $person->get_name->get_last_name
defined $person->get_name defined $person->get_name->get_last_name
Truth table0%0/3
A and B
A= defined $person->get_nameB= defined $person->get_name->get_last_name
ABresult
0X0
100
111
168 if ( ( defined $person->get_name() )
169 && ( defined $person->get_name()->get_last_name() ) );
170 }
171
172 0 $self->_toppage( $self->{textGenerator}->{Surnames} );
173
174 0 ▶ while ( defined( my $a_last_name = $last_name_set->each ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined(my $a_last_name = $last_name_set->each)) 0 0 0
175 0 push @{ $self->{nodes} }, $a_last_name;
176 }
177 0 my @sortednodes = sort @{ $self->{nodes} };
178
179 print $self->{cgi}->start_table(
180 0 { -cellpadding => '5', -border => '1', -align => 'center' } ), "\n";
181 0 for my $people_count ( 0 .. $#sortednodes ) {
182 print $self->{cgi}->start_Tr()
183 0 ▶ if ( $people_count % $column_number == 0 );
Branch: 1 branch
BranchTrueFalseTotal
if $people_count % $column_number == 0 0 0 0
184 print $self->{cgi}->td(
185 $self->{cgi}->a(
186 {
187 0 -href =>
188 "$self->{treeScript}?type=subfamily&surname=$sortednodes[$people_count]&lang=$self->{lang}"
189 },
190 $sortednodes[$people_count]
191 )
192 );
193 0 ▶ print $self->{cgi}->end_Tr(), "\n"
Branch: 1 branch
BranchTrueFalseTotal
if $people_count % $column_number == $column_number - 1 0 0 0
194 if ( $people_count % $column_number == $column_number - 1 );
195 }
196 0 ▶ print $self->{cgi}->end_Tr(), "\n"
Branch: 1 branch
BranchTrueFalseTotal
if $#sortednodes % $column_number != 0 0 0 0
197 if ( $#sortednodes % $column_number != 0 );
198 print $self->{cgi}->end_table(), "\n", $self->{cgi}->br,
199 $self->{textGenerator}->{Total} . ' '
200 . $last_name_set->size . ' '
201 0 . $self->{textGenerator}->{people};
202 0 $self->_endpage();
203
204 0 return;
205 }
206
207 0 ▶sub _draw_general_table {
Subroutine _draw_general_table: not called CC=2 SCAR=17.9
208 0 my ( $self, $func, $attribute, $people_with_type_r, $text2 ) = validate_pos(
209 @_,
210 { type => HASHREF },
211 { type => CODEREF },
212 { type => SCALAR },
213 { type => ARRAYREF },
214 { type => SCALAR }
215 );
216 0 my $nr_of_man = 0;
217 0 my $nr_of_woman = 0;
218
219 print $self->{cgi}->start_table(
220 { -cellpadding => '5', -border => '1', -align => 'center' } ), "\n",
221 $self->{cgi}->Tr(
222 $self->{cgi}->th( $self->{textGenerator}{photo} ),
223 $self->{cgi}->th( $self->{textGenerator}{name} ),
224 0 $self->{cgi}->th( $self->{textGenerator}{$attribute} )
225 );
226
227 0 foreach my $a_person ( @{$people_with_type_r} ) {
228 0 my $class =
229 $self->get_cell_class( $a_person, \$nr_of_man, \$nr_of_woman );
230 print $self->{cgi}->start_Tr( { -class => $class } ),
231 $self->{cgi}->td( $self->html_img($a_person) ),
232
233 $self->{cgi}->td(
234 $self->aref_tree(
235 $a_person->get_name()->get_full_name(), $a_person
236 )
237 ),
238 $self->{cgi}->td( $func->($a_person) ),
239 0 $self->{cgi}->end_Tr, "\n";
240 }
241 print $self->{cgi}->end_table, "\n", $self->{cgi}->br, $text2,
242 0 scalar( @{$people_with_type_r} ),
243 " ($self->{textGenerator}{man}: ", $nr_of_man,
244 ", $self->{textGenerator}{woman}: ", $nr_of_woman,
245 ", $self->{textGenerator}{unknown}: ",
246 0 scalar( @{$people_with_type_r} ) - $nr_of_man - $nr_of_woman, ")";
247
248 0 return;
249 }
250 #########################################################
251 # GENERAL PAGE
252 #########################################################
253 0 ▶sub _draw_general_page {
Subroutine _draw_general_page: not called CC=1 SCAR=6.9
254 0 my ( $self, $func, $attribute, $title, $text2 ) = validate_pos(
255 @_,
256 { type => HASHREF },
257 { type => CODEREF },
258 { type => SCALAR },
259 { type => SCALAR },
260 { type => SCALAR }
261 );
262
263 my @people_with_type =
264 0 grep { defined $func->($_) }
265 0 ( grep { defined $_->get_name() }
266 0 $self->{family_tree_data}->get_all_people() );
267 @people_with_type = sort {
268 0 $a->get_name()->get_full_name() cmp $b->get_name()->get_full_name()
269 } (@people_with_type);
270
271 0 $self->_toppage($title);
272 0 $self->_draw_general_table( $func, $attribute, \@people_with_type, $text2 );
273 0 $self->_endpage();
274
275 0 return;
276 }
277
278 #########################################################
279 # BIRTHDAYS PAGE
280 #########################################################
281 0 ▶sub _draw_birthday_page {
Subroutine _draw_birthday_page: not called CC=8 SCAR=42.8
282 0 my ($self) = validate_pos( @_, { type => HASHREF } );
283 0 my $months = $self->{textGenerator}->{months_array};
284 0 my $month = decode_utf8( $self->{cgi}->param('month') );
285
286 0 ▶ if ( !defined $month ) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $month) { } 0 0 0
287 0 $month = (localtime)[4] + 1;
288 }
289 else {
290 0 my $index = 0;
291 0 ▶ ++$index while ( $months->[$index] ne $month );
Branch: 1 branch
BranchTrueFalseTotal
$months->[$index] ne $month and do { ++$index } 0 0 0
292 0 $month = $index + 1;
293 }
294
295 my @people_with_bday = grep {
296 defined $_->get_name()
297 && defined $_->get_date_of_birth()
298 && defined $_->get_date_of_birth()->{month}
299 0 ▶ && $_->get_date_of_birth()->{month} == $month
Condition0%0/9
defined $_->get_name && defined $_->get_date_of_birth && defined $_->get_date_of_birth->{'month'} && $_->get_date_of_birth->{'month'} == $month
!ll&&!rl&&r
000
defined $_->get_name and defined $_->get_date_of_birth and defined $_->get_date_of_birth->{"month"}
!ll&&!rl&&r
000
defined $_->get_name and defined $_->get_date_of_birth
!ll&&!rl&&r
000
MC/DC0%0/4
defined $_->get_name && defined $_->get_date_of_birth && defined $_->get_date_of_birth->{'month'} && $_->get_date_of_birth->{'month'} == $month
defined $_->get_name defined $_->get_date_of_birth defined $_->get_date_of_birth->{"month"} $_->get_date_of_birth->{'month'} == $month
Truth table0%0/5
A and B and C && D
A= defined $_->get_nameB= defined $_->get_date_of_birthC= defined $_->get_date_of_birth->{"month"}D= $_->get_date_of_birth->{'month'} == $month
ABCDresult
0XXX0
10XX0
110X0
11100
11111
300 0 } ( $self->{family_tree_data}->get_all_people() );
301
302 0 my $title = $self->{textGenerator}->birthday_reminder( $month - 1 );
303 0 $self->_toppage($title);
304 @people_with_bday = sort {
305 0 $a->get_name()->get_full_name() cmp $b->get_name()->get_full_name()
306 } (@people_with_bday);
307
308 $self->_draw_general_table( \&Ftree::Person::get_date_of_birth,
309 'date_of_birth', \@people_with_bday,
310 0 $self->{textGenerator}->total_living_with_birthday( $month - 1 ) );
311
312 # Add the button for other months
313 print $self->{cgi}->start_form(
314 {
315 -action => $self->{treeScript},
316 -method => 'get'
317 }
318 ),
319 "\n$self->{textGenerator}->{CheckAnotherMonth}:\n",
320 $self->{cgi}->start_Select(
321 {
322 0 -name => 'month',
323 -size => 1
324 }
325 ),
326 "\n";
327 0 for my $index ( 0 .. 11 ) {
328 0 ▶ if ( $index == ( $month - 1 ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($index == $month - 1) { } 0 0 0
329 print $self->{cgi}
330 0 ->option( { -selected => "selected" }, $months->[$index] ), "\n";
331 }
332 else {
333 0 print $self->{cgi}->option( $months->[$index] ), "\n";
334 }
335 }
336 print $self->{cgi}->end_Select, "\n",
337 $self->{cgi}
338 ->input( { -type => 'hidden', -name => "type", -value => "bdays" } ),
339 "\n",
340 $self->{cgi}->input(
341 {
342 -type => 'hidden',
343 -name => 'password',
344 -value => $self->{settings}{password}
345 }
346 ),
347 "\n",
348 $self->{cgi}->input(
349 { -type => 'hidden', -name => 'lang', -value => $self->{lang} } ), "\n",
350
351 $self->{cgi}->input(
352 { -type => "submit", -value => "$self->{textGenerator}->{Go}" } ),
353 0 $self->{cgi}->end_form;
354
355 0 $self->_endpage();
356
357 0 return;
358 }
359 #########################################################
360 # Facehall page
361 #########################################################
362 0 ▶sub _draw_facehall_page {
Subroutine _draw_facehall_page: not called CC=10 SCAR=47.0
363 0 my ($self) = validate_pos( @_, { type => HASHREF } );
364 0 my $column_number = 5;
365
366 my @people_with_photo =
367 0 ▶ grep { defined $_->get_name() && defined $_->get_default_picture() }
Condition0%0/3
defined $_->get_name && defined $_->get_default_picture
!ll&&!rl&&r
000
MC/DC0%0/2
defined $_->get_name && defined $_->get_default_picture
defined $_->get_name defined $_->get_default_picture
Truth table0%0/3
A && B
A= defined $_->get_nameB= defined $_->get_default_picture
ABresult
0X0
100
111
368 0 ( $self->{family_tree_data}->get_all_people() );
369 @people_with_photo = sort {
370 0 $a->get_name()->get_full_name() cmp $b->get_name()->get_full_name()
371 } (@people_with_photo);
372
373 0 $self->_toppage( $self->{textGenerator}->{Hall_of_faces} );
374
375 0 my $nr_of_man = 0;
376 0 my $nr_of_woman = 0;
377 print $self->{cgi}
378 0 ->start_table( { -cellpadding => '7', -align => 'center' } ), "\n";
379
380 0 foreach my $index ( 0 .. $#people_with_photo ) {
381 0 ▶ print $self->{cgi}->start_Tr, "\n" if ( $index % $column_number == 0 );
Branch: 1 branch
BranchTrueFalseTotal
if $index % $column_number == 0 0 0 0
382 0 my $class = $self->get_cell_class( $people_with_photo[$index],
383 \$nr_of_man, \$nr_of_woman );
384 print $self->{cgi}
385 ->start_td( { -class => $class, -align => 'center' } ),
386 $self->aref_tree( $self->html_img( $people_with_photo[$index] ),
387 $people_with_photo[$index] ),
388 $self->{cgi}->br,
389 $people_with_photo[$index]->get_name()->get_full_name(),
390 0 $self->{cgi}->end_td;
391 0 ▶ print $self->{cgi}->end_Tr, "\n"
Branch: 1 branch
BranchTrueFalseTotal
if $index % $column_number == $column_number - 1 0 0 0
392 if ( $index % $column_number == $column_number - 1 );
393 }
394 0 ▶ print $self->{cgi}->end_Tr, "\n"
Branch: 1 branch
BranchTrueFalseTotal
if $#people_with_photo % $column_number != 0 0 0 0
395 if ( $#people_with_photo % $column_number != 0 );
396 print $self->{cgi}->end_table, "\n", $self->{cgi}->br,
397 0 $self->{textGenerator}->{Total_with_photo}, scalar(@people_with_photo),
398 " ($self->{textGenerator}{man}: ", $nr_of_man,
399 ", $self->{textGenerator}{woman}: ", $nr_of_woman,
400 ", $self->{textGenerator}{unknown}: ",
401 scalar(@people_with_photo) - $nr_of_man - $nr_of_woman, ")";
402 print $self->{cgi}
403 0 ->start_table( { -cellpadding => '7', -align => 'center' } ), "\n";
404 0 print $self->{cgi}->start_Tr;
405 0 print $self->{cgi}->start_td( { -align => 'center' } );
406 0 print $self->{cgi}->br, " $self->{textGenerator}{Prayer_for_the_living}: ";
407
408 0 foreach my $index ( 0 .. $#people_with_photo ) {
409 0 ▶ if ( $people_with_photo[$index]->get_is_living() ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($people_with_photo[$index]->get_is_living) 0 0 0
410 print $self->{cgi}->br,
411 0 $people_with_photo[$index]->get_name()->get_first_name(), ' (',
412 $people_with_photo[$index]->get_name()->get_full_name(), ')';
413 }
414 }
415
416 0 print $self->{cgi}->end_td;
417
418 0 print $self->{cgi}->start_td( { -align => 'center' } );
419 print $self->{cgi}->br,
420 0 " $self->{textGenerator}{Prayer_for_the_departed}: ";
421 0 foreach my $index ( 0 .. $#people_with_photo ) {
422 0 ▶ if ( !$people_with_photo[$index]->get_is_living() ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($people_with_photo[$index]->get_is_living) 0 0 0
423 print $self->{cgi}->br,
424 0 $people_with_photo[$index]->get_name()->get_first_name(), ' (',
425 $people_with_photo[$index]->get_name()->get_full_name(), ')';
426 }
427 }
428 0 print $self->{cgi}->end_td;
429
430 0 print $self->{cgi}->end_Tr, "\n";
431
432 0 print $self->{cgi}->end_table, "\n", $self->{cgi}->br;
433
434 0 $self->_endpage();
435
436 0 return;
437 }
438 #########################################################
439 # INVALID PAGE TYPE ERROR
440 #########################################################
441 0 ▶sub _draw_invalid_page {
Subroutine _draw_invalid_page: not called CC=1 SCAR=6.9
442 0 my ($self) = validate_pos( @_, { type => HASHREF } );
443 0 $self->_toppage( $self->{textGenerator}->{Error} );
444
445 print $self->{textGenerator}->{Invalid_option}, $self->{cgi}->br, "\n",
446 0 $self->{textGenerator}->{Valid_options};
447
448 0 $self->_endpage();
449 0 exit 1;
450 }
451
452 2 1;
453 __END__
« lib/Ftree/DataParsers/ExtendedSimonWardFormat.pm ↑ Summary lib/Ftree/FamilyTreeData.pm »