Re: Reduce the number of special cases to build contrib modules on windows

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Reduce the number of special cases to build contrib modules on windows
Дата
Msg-id 202107271601.aojhkuiny6xn@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Reduce the number of special cases to build contrib modules on windows  (ilmari@ilmari.org (Dagfinn Ilmari Mannsåker))
Ответы Re: Reduce the number of special cases to build contrib modules on windows
Список pgsql-hackers
On 2021-Jul-27, Dagfinn Ilmari Mannsåker wrote:

> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:

> > +        if (grep { $_ eq $ref} @{ $self->{references} } == 0)
> 
> I disagree.  Using grep in boolean context is perfectly idiomatic perl.
> What would be more idiomatic is List::Util::any, but that's not availble
> without upgrading List::Util from CPAN on Perls older than 5.20, so we
> can't use that.

I was wondering if instead of grepping the whole list for each addition
it would make sense to push always, and do a unique-ification step at
the end.

-- 
Álvaro Herrera              Valdivia, Chile  —  https://www.EnterpriseDB.com/



В списке pgsql-hackers по дате отправления:

Предыдущее
От: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Дата:
Сообщение: Re: Reduce the number of special cases to build contrib modules on windows
Следующее
От: John Naylor
Дата:
Сообщение: Re: truncating timestamps on arbitrary intervals