File Coverage

blib/lib/DateTime/Event/MultiCron.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package DateTime::Event::MultiCron;
2              
3 1     1   7664 use strict;
  1         4  
  1         39  
4 1     1   6 use warnings;
  1         3  
  1         42  
5              
6             require Exporter;
7              
8 1     1   5 use base 'DateTime::Event::Cron';
  1         13  
  1         1811  
9              
10             our $VERSION = '0.01';
11              
12             sub from_multicron {
13             my $class=shift;
14             my $dts=undef;
15              
16             while (my $cron=shift) {
17             my $dtc=$class->new($cron);
18             my $tdts=$dtc->as_set();
19              
20             if ($dts) {
21             $dts=$dts->union($tdts);
22             } else {
23             $dts=$tdts;
24             }
25             }
26             return $dts;
27             }
28              
29             1;
30             __END__