diff options
| author | fukachan <fukachan> | 2003-02-18 15:57:46 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-02-18 15:57:46 +0000 |
| commit | f67913d09f41ef7314afe9cdc8d44f81612ecde7 (patch) | |
| tree | c644ab48b2150a90f7f159e42508ff22f84cd5c9 | |
| parent | 8a6feb11d322eab22656eb1a76893c7390514af4 (diff) | |
| download | fml8-f67913d09f41ef7314afe9cdc8d44f81612ecde7.tar.gz fml8-f67913d09f41ef7314afe9cdc8d44f81612ecde7.tar.bz2 fml8-f67913d09f41ef7314afe9cdc8d44f81612ecde7.zip | |
use FML::Error->db_open() not FML::Error::Cache for cache db open.
| -rw-r--r-- | fml/lib/FML/Error.pm | 35 | ||||
| -rw-r--r-- | fml/lib/FML/Process/Error.pm | 7 |
2 files changed, 33 insertions, 9 deletions
diff --git a/fml/lib/FML/Error.pm b/fml/lib/FML/Error.pm index 42e42f0c..6395177f 100644 --- a/fml/lib/FML/Error.pm +++ b/fml/lib/FML/Error.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: Error.pm,v 1.12 2003/01/25 09:14:04 fukachan Exp $ +# $FML: Error.pm,v 1.13 2003/02/09 12:31:40 fukachan Exp $ # package FML::Error; @@ -56,6 +56,31 @@ sub new } +# Descriptions: open cache database. +# Arguments: OBJ($self) +# Side Effects: none +# Return Value: OBJ +sub db_open +{ + my ($self) = @_; + my $curproc = $self->{ _curproc }; + + use FML::Error::Cache; + return new FML::Error::Cache $curproc; +} + + +# Descriptions: dummy. +# Arguments: OBJ($self) +# Side Effects: none +# Return Value: none +sub db_close +{ + my ($self) = @_; + my $curproc = $self->{ _curproc }; +} + + =head2 analyze() open error message cache and @@ -75,13 +100,11 @@ error_analyzer_function } is unspecified. # Return Value: none sub analyze { - my ($self) = @_; + my ($self) = @_; my $curproc = $self->{ _curproc }; my $config = $curproc->config(); - - use FML::Error::Cache; - my $cache = new FML::Error::Cache $curproc; - my $rdata = $cache->get_all_values_as_hash_ref(); + my $cache = $self->db_open(); + my $rdata = $cache->get_all_values_as_hash_ref(); use FML::Error::Analyze; my $analyzer = new FML::Error::Analyze $curproc; diff --git a/fml/lib/FML/Process/Error.pm b/fml/lib/FML/Process/Error.pm index aea8e24c..8ef57ac8 100644 --- a/fml/lib/FML/Process/Error.pm +++ b/fml/lib/FML/Process/Error.pm @@ -3,7 +3,7 @@ # Copyright (C) 2002,2003 Ken'ichi Fukamachi # All rights reserved. # -# $FML: Error.pm,v 1.26 2003/02/03 12:25:59 fukachan Exp $ +# $FML: Error.pm,v 1.27 2003/02/11 09:48:16 fukachan Exp $ # package FML::Process::Error; @@ -152,8 +152,9 @@ sub run my $bouncer = new Mail::Bounce; $bouncer->analyze( $msg ); - use FML::Error::Cache; - my $errorcache = new FML::Error::Cache $curproc; + use FML::Error; + my $error_obj = new FML::Error $curproc; + my $errorcache = $error_obj->db_open(); for my $address ( $bouncer->address_list ) { my $status = $bouncer->status( $address ); |
