> > Как-то так... > 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 Вообще говоря, имеет, если эти get_father/mother возвращают пустой список в списковом контексте. Хотя этот вариант кода выглядит еще хуже, чем вариант топикстартера, который можно отформатировать нормально и не париться. либо переписать все 16 октября 2015 г., 16:57 пользователь Oleg Alexeenkov <[email protected]> написал: > Илья Винокуров <[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 >
-- Moscow.pm mailing list [email protected] | http://moscow.pm.org
