Re: BUG #5339: Version of Perl detected incorrectly - Mailing list pgsql-bugs

From Tim Bunce
Subject Re: BUG #5339: Version of Perl detected incorrectly
Date
Msg-id 20100223203946.GN1018@timac.local
Whole thread Raw
In response to Re: BUG #5339: Version of Perl detected incorrectly  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #5339: Version of Perl detected incorrectly  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5339: Version of Perl detected incorrectly
Next
From: Tom Lane
Date:
Subject: Re: BUG #5339: Version of Perl detected incorrectly