summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-12-30 03:49:35 +0000
committerfukachan <fukachan>2003-12-30 03:49:35 +0000
commit3ec97974b89e3dc36e164a24083e13f173bc7cdc (patch)
treedea0c4f10dab51fe452eb2046c219ce54699ea2c
parentbb3133c19e4a387268c225770bad61676426df36 (diff)
downloadfml8-3ec97974b89e3dc36e164a24083e13f173bc7cdc.tar.gz
fml8-3ec97974b89e3dc36e164a24083e13f173bc7cdc.tar.bz2
fml8-3ec97974b89e3dc36e164a24083e13f173bc7cdc.zip
FNF: defined $db ...
-rw-r--r--fml/lib/FML/Data/Deadline.pm14
1 files changed, 9 insertions, 5 deletions
diff --git a/fml/lib/FML/Data/Deadline.pm b/fml/lib/FML/Data/Deadline.pm
index 121b5a95..fa1a6ff6 100644
--- a/fml/lib/FML/Data/Deadline.pm
+++ b/fml/lib/FML/Data/Deadline.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: @template.pm,v 1.7 2003/01/01 02:06:22 fukachan Exp $
+# $FML: Deadline.pm,v 1.1 2003/11/22 05:41:52 fukachan Exp $
#
package FML::Data::Deadline;
@@ -154,10 +154,12 @@ sub _open_db
my $db = $self->{ _journal_db };
my $dir = $self->{ _cache_dir };
my $class = $self->{ _class };
- my $_db = $db->open($dir, $class);
- $self->{ _db } = $_db;
- return $_db;
+ if (defined $db) {
+ my $_db = $db->open($dir, $class);
+ $self->{ _db } = $_db;
+ return $_db;
+ }
}
@@ -169,7 +171,9 @@ sub _close_db
{
my ($self) = @_;
my $db = $self->{ _journal_db };
- $db->close();
+ if (defined $db) {
+ $db->close();
+ }
}