projects
/
check_postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
adf6b1e
)
Quick fix to remove the 'use' of Data::Parse for the whole script.
author
Greg Sabino Mullane
<
[email protected]
>
Wed, 4 Feb 2009 15:41:53 +0000
(10:41 -0500)
committer
Greg Sabino Mullane
<
[email protected]
>
Wed, 4 Feb 2009 15:41:53 +0000
(10:41 -0500)
check_postgres.pl
patch
|
blob
|
blame
|
history
diff --git
a/check_postgres.pl
b/check_postgres.pl
index 81586b2df95b82302b1249ad358d936a59b0bfe6..ae2c929f717f9ce62f5b14d13521d22c5bfd3f97 100755
(executable)
--- a/
check_postgres.pl
+++ b/
check_postgres.pl
@@
-3749,7
+3749,13
@@
sub check_checkpoint {
my $last = $1;
## Convert to number of seconds
- use Date::Parse;
+ eval {
+ require Date::Parse;
+ import Date::Parse;
+ };
+ if ($@) {
+ ndie "Must install the Perl module 'Date::Parse' to use the checkpoint action";
+ }
my $dt = str2time($last);
if ($dt !~ /^\d+$/) {
ndie qq{Unable to parse pg_controldata output: "$last"\n};