+ my $lock_path = delete $self->{"lk_id.$self.$$"} or return;
+ unlink($lock_path);
+}
+
+sub detect_fmt ($) {
+ my ($dst) = @_;
+ if ($dst =~ m!\A([:/]+://)!) {
+ die "$1 support not implemented, yet\n";
+ } elsif (!-e $dst || -d _) {
+ 'maildir'; # the default TODO: MH?
+ } elsif (-f _ || -p _) {
+ die "unable to determine mbox family of $dst\n";
+ } else {
+ die "unable to determine format of $dst\n";
+ }