On Mon, Feb 22, 2010 at 04:31:05PM -0500, Tom Lane wrote: > Alex Hunsaker <bada...@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. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs