Re: BUG #5339: Version of Perl detected incorrectly

Поиск
Список
Период
Сортировка
От Tim Bunce
Тема Re: BUG #5339: Version of Perl detected incorrectly
Дата
Msg-id 20100223222120.GR1018@timac.local
обсуждение исходный текст
Ответ на Re: BUG #5339: Version of Perl detected incorrectly  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Tue, Feb 23, 2010 at 04:02:11PM -0500, Tom Lane wrote:
> Tim Bunce <Tim.Bunce@pobox.com> writes:
> > On Mon, Feb 22, 2010 at 04:31:05PM -0500, Tom Lane wrote:
> >> I still think that this is optimizing the wrong thing.  We care about
> >> the clarity of the message the user sees, not about how short or clean
> >> the Perl code is.
>
> > There's no need to try to parse the perl -v output, which is intended
> > for humans and may change in future.  Using
>
> >     perl -e 'print $]'
>
> will give you the version number in floating point format for all
> versions of perl.
>
> $ /usr/local/bin/perl4 -e 'print $]'
> $RCSfile: perl.c,v $$Revision: 4.0.1.8 $$Date: 1993/02/05 19:39:30 $
> Patch level: 36
>
> I will refrain from further comment.

Ah, sorry. It needs to be in numeric context:

    perl -e 'print($]+0)'

Tim.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #5339: Version of Perl detected incorrectly
Следующее
От: Tim Bunce
Дата:
Сообщение: New PL/Perl failure with Safe 2.2x due to recursion (8.x & 9.0)