Re: BUG #5339: Version of Perl detected incorrectly

Поиск
Список
Период
Сортировка
От Tim Bunce
Тема Re: BUG #5339: Version of Perl detected incorrectly
Дата
Msg-id 20100223203946.GN1018@timac.local
обсуждение исходный текст
Ответ на Re: BUG #5339: Version of Perl detected incorrectly  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #5339: Version of Perl detected incorrectly
Список pgsql-bugs
On Mon, Feb 22, 2010 at 04:31:05PM -0500, Tom Lane wrote:
> Alex Hunsaker <badalex@gmail.com> writes:
> > How about something like the below?
>
> 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.  I'm inclined to stay with the same basic
> implementation and just hack up the regexp some more to cope with 5.11's
> more verbose -v output.

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. For perl5 the format is 5.xxxyyy so testing
for >= 5.008 (or ideally 5.008001) will work fine.

Tim.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #5339: Version of Perl detected incorrectly
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #5339: Version of Perl detected incorrectly