Илья Винокуров <[email protected]> писал(а) в своём письме Thu, 15 Oct 2015 09:55:18 +0300:

Как-то так...

my ($father, $mother, $email, $homepage, $date_of_birth) = (
  $person->get_father // undef,
  $person->get_mother // undef,
  $person->get_email // undef,
  $person->get_homepage // undef,
  $person->get_date_of_birth // undef
);

$person->get_father // undef
Такое выражение вообще имеет смысл?
оставить просто
$person->get_father


push @person_row,
    $father && $father->get_id,
    $mother && $mother->get_id,
    $email,
    $homepage,
$date_of_birth ? join('/', $date_of_birth->day // '', $date_of_birth->month // '', $date_of_birth->year // '') : '';

no warnings qw(uninitialized);
и не надо этих // ''
--
Moscow.pm mailing list
[email protected] | http://moscow.pm.org

Ответить