Improve logic in PostgresVersion.pm
authorAndrew Dunstan <andrew@dunslane.net>
Tue, 27 Apr 2021 12:21:15 +0000 (08:21 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Tue, 27 Apr 2021 12:21:15 +0000 (08:21 -0400)
commitfa26eba221a9e837493df47d0255ce615129e9a8
tree57a30699844e8d92ce9eb4ca3eb4c2c7f6a07346
parent0c8f40863acb94963df9fd6a4369eb71efe9a93b
Improve logic in PostgresVersion.pm

Handle the situation where perl swaps the order of operands of
the comparison operator. See `perldoc overload` for details:

The third argument is set to TRUE if (and only if) the two
operands have been swapped. Perl may do this to ensure that the
first argument ($self) is an object implementing the overloaded
operation, in line with general object calling conventions.
src/test/perl/PostgresVersion.pm