- _check("PG-ARCHIVEDIR $self->{'props'}->{'pg-archivedir'}",
- "is a directory", "is NOT a directory",
- sub {-d $_[0]}, $self->{'props'}->{'pg-archivedir'});
- _check("PG-ARCHIVEDIR $self->{'props'}->{'pg-archivedir'}",
- "is readable", "is NOT readable",
- sub {-r $_[0]}, $self->{'props'}->{'pg-archivedir'});
- _check("PG-ARCHIVEDIR $self->{'props'}->{'pg-archivedir'}",
- "is executable", "is NOT executable",
- sub {-x $_[0]}, $self->{'props'}->{'pg-archivedir'});
- _check_parent_dirs($self->{'props'}->{'pg-archivedir'});
- _check("Are both PG-PASSFILE and PG-PASSWORD set?",
- "No (okay)",
- "Yes. Please set only one or the other",
- sub {!($self->{'props'}->{'pg-passfile'} and
- $self->{'props'}->{'pg-password'})});
+ if (_check("PG-ARCHIVEDIR property", "is set", "is NOT set",
+ sub { $_[0] }, $self->{'props'}->{'pg-archivedir'})) {
+ _check("PG-ARCHIVEDIR $self->{'props'}->{'pg-archivedir'}",
+ "is a directory", "is NOT a directory",
+ sub {-d $_[0]}, $self->{'props'}->{'pg-archivedir'});
+ _check("PG-ARCHIVEDIR $self->{'props'}->{'pg-archivedir'}",
+ "is readable", "is NOT readable",
+ sub {-r $_[0]}, $self->{'props'}->{'pg-archivedir'});
+ _check("PG-ARCHIVEDIR $self->{'props'}->{'pg-archivedir'}",
+ "is executable", "is NOT executable",
+ sub {-x $_[0]}, $self->{'props'}->{'pg-archivedir'});
+ _check_parent_dirs($self->{'props'}->{'pg-archivedir'});
+ }
+
+ $try_connect &&=
+ _check("Are both PG-PASSFILE and PG-PASSWORD set?",
+ "No (okay)",
+ "Yes. Please set only one or the other",
+ sub {!($self->{'props'}->{'pg-passfile'} and
+ $self->{'props'}->{'pg-password'})});
+