File Coverage

blib/lib/MIDI/Drummer/Tiny/Types.pm
Criterion Covered Total %
statement 21 21 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod n/a
total 28 28 100.0


line stmt bran cond sub pod time code
1             package MIDI::Drummer::Tiny::Types;
2             $MIDI::Drummer::Tiny::Types::VERSION = '0.7004';
3             our $AUTHORITY = 'cpan:GENE';
4              
5             # ABSTRACT: Type library for MIDI::Drummer::Tiny
6              
7 7     7   309793 use strict;
  7         12  
  7         227  
8 7     7   35 use warnings;
  7         23  
  7         531  
9              
10             use Type::Library
11 7         87 -extends => [ qw(
12             Types::MIDI
13             Types::Music
14             Types::Common::String
15             ) ],
16             -declare => qw(
17             Duration
18             MIDI_File
19             Soundfont_File
20 7     7   3394 );
  7         262203  
21 7     7   1799999 use Type::Utils -all;
  7         63  
  7         67  
22 7     7   18940 use Types::Standard qw(FileHandle);
  7         20  
  7         51  
23 7     7   22104 use Types::Path::Tiny qw(File Path);
  7         306632  
  7         89  
24              
25 7     7   5831 use MIDI::Util qw(midi_dump);
  7         14811  
  7         1275  
26              
27             #pod =type Duration
28             #pod
29             #pod A L corresponding to
30             #pod a L.
31             #pod
32             #pod =cut
33              
34             my %length = %{ midi_dump('length') };
35             declare Duration, as NonEmptyStr, where { exists $length{$_} };
36              
37             #pod =type MIDI_File
38             #pod
39             #pod The name of the MIDI file to be written.
40             #pod
41             #pod =cut
42              
43             declare MIDI_File, as NonEmptyStr | Path | FileHandle;
44              
45             #pod =type Soundfont_File
46             #pod
47             #pod The name of the MIDI soundfont file to use.
48             #pod
49             #pod =cut
50              
51             declare Soundfont_File, as NonEmptyStr | File;
52              
53             1;
54              
55             __END__