Folder/Ezmlm.pm untested

filter: Statementstmt 0.0% 0 / 29 Branchbran 0.0% 0 / 8 Conditioncond 0.0% 0 / 3 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 47 CC 5 SCAR 27.7
CC
5
Cov
0%
_what_is_there
30.0
BEGIN
2.0
BEGIN
2.0
CRAP 16.0
1 use strict;
2 use warnings;
3 package Email::Folder::Ezmlm;
4 # ABSTRACT: reads raw RFC822 mails from an ezmlm archive
5 $Email::Folder::Ezmlm::VERSION = '0.859';
6 use Carp;
7 use Email::Folder::Maildir;
8 use parent 'Email::Folder::Maildir';
9  
10 # we're a little complicit, just redefining an internal method, but
11 # that's fine, we maintain both piles :)
12  
13 sub _what_is_there {
14 my $self = shift;
15 my $dir = $self->{_file};
16  
17 croak "$dir does not exist" unless (-e $dir);
18 croak "$dir is not an ezmlm archive" unless (-d $dir);
19 croak "$dir is not an ezmlm archive" unless (-e "$dir/archive" && -d "$dir/archive");
20  
21 my $num;
22 if (my $fh = IO::File->new("$dir/num")) {
23 ($num) = (<$fh> =~ m/^(\d+)/);
24 }
25  
26 $self->{_messages} = [ map {
27 sprintf '%s/archive/%d/%02d', $dir, int $_ / 100, $_ % 100
28 } 1..$num ];
29 }
30  
31 1;
32  
33 __END__