From: | Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alex Hunsaker <badalex(at)gmail(dot)com>, Jonathan <jonathan(at)leto(dot)net>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #5339: Version of Perl detected incorrectly |
Date: | 2010-02-23 20:39:46 |
Message-ID: | 20100223203946.GN1018@timac.local |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Mon, Feb 22, 2010 at 04:31:05PM -0500, Tom Lane wrote:
> Alex Hunsaker <badalex(at)gmail(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-02-23 21:02:11 | Re: BUG #5339: Version of Perl detected incorrectly |
Previous Message | Tom Lane | 2010-02-23 18:37:39 | Re: BUG #5339: Version of Perl detected incorrectly |