File Coverage

blib/lib/POE/Framework/MIDI/Interval.pm
Criterion Covered Total %
statement 19 19 100.0
branch 1 2 50.0
condition 1 3 33.3
subroutine 6 6 100.0
pod 0 3 0.0
total 27 33 81.8


line stmt bran cond sub pod time code
1             package POE::Framework::MIDI::Interval;
2 2     2   3949 use strict;
  2         8  
  2         83  
3 2     2   12 use vars '$VERSION'; $VERSION = '0.02';
  2         4  
  2         117  
4 2     2   14 use POE::Framework::MIDI::Utility;
  2         3  
  2         679  
5              
6             sub new {
7 16     16 0 101 my ( $self, $class ) = ( {}, shift );
8 16         41 bless $self,$class;
9 16         51 my %params = @_;
10 16         41 $self->{cfg} = \%params;
11 16 50 33     91 die "Interval needs a duration and a notes listref" unless ($params{duration}
12             and ref($params{notes}) eq 'ARRAY');
13 16         44 return $self;
14             }
15              
16             sub duration {
17 16     16 0 23 my $self = shift;
18 16         59 return $self->{cfg}->{duration};
19             }
20              
21             sub notes {
22 16     16 0 25 my $self = shift;
23 16         48 return $self->{cfg}->{notes};
24             }
25              
26              
27              
28              
29             1;