summaryrefslogtreecommitdiff
path: root/fml/lib/Mail/ThreadTrack
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-11-18 08:57:29 +0000
committerfukachan <fukachan>2001-11-18 08:57:29 +0000
commit5cdb01bb9f2cebdde7b59a3d0d4867f63cfa6510 (patch)
treee82e6ef2714588dec6f79bf53596badd03b9ddd2 /fml/lib/Mail/ThreadTrack
parent2102faeb7c7a7b5ac8855d1a604afcc04f4d6f3b (diff)
downloadfml8-5cdb01bb9f2cebdde7b59a3d0d4867f63cfa6510.tar.gz
fml8-5cdb01bb9f2cebdde7b59a3d0d4867f63cfa6510.tar.bz2
fml8-5cdb01bb9f2cebdde7b59a3d0d4867f63cfa6510.zip
fmlthread db_dump $ml [$type]
to dump hash table as text for e.g. backup
Diffstat (limited to 'fml/lib/Mail/ThreadTrack')
-rw-r--r--fml/lib/Mail/ThreadTrack/DB.pm23
1 files changed, 22 insertions, 1 deletions
diff --git a/fml/lib/Mail/ThreadTrack/DB.pm b/fml/lib/Mail/ThreadTrack/DB.pm
index 126855a2..3a427c84 100644
--- a/fml/lib/Mail/ThreadTrack/DB.pm
+++ b/fml/lib/Mail/ThreadTrack/DB.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: DB.pm,v 1.11 2001/11/09 13:30:57 fukachan Exp $
+# $FML: DB.pm,v 1.12 2001/11/16 10:09:14 fukachan Exp $
#
package Mail::ThreadTrack::DB;
@@ -197,6 +197,27 @@ sub db_mkdb
}
+=head2 db_dump([$type])
+
+dump hash as text.
+dump status database if $type is not specified.
+
+=cut
+
+
+sub db_dump
+{
+ my ($self, $type) = @_;
+ my $db_type = "_" . ( defined $type ? $type : 'status' );
+ my $rh = $self->{ _hash_table }->{ $db_type };
+
+ my ($k, $v);
+ while (($k, $v) = each %$rh) {
+ printf "%-20s %s\n", $k, $v;
+ }
+}
+
+
=head1 AUTHOR
Ken'ichi Fukamachi