The new() documentation contradicts the example given in the SYNOPSIS. The example in the SYNOPSIS uses eval{} to catch exceptions but doesn't use $Test::PostgreSQL::errstr but $@ instead. The new() documentation doesn't even mention that the constructor may throw exceptions in the case of error.