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.7001';
3             our $AUTHORITY = 'cpan:GENE';
4              
5             # ABSTRACT: Type library for MIDI::Drummer::Tiny
6              
7 7     7   285793 use strict;
  7         17  
  7         319  
8 7     7   38 use warnings;
  7         43  
  7         765  
9              
10             use Type::Library
11 7         119 -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   4401 );
  7         309903  
21 7     7   2101636 use Type::Utils -all;
  7         32  
  7         74  
22 7     7   22286 use Types::Standard qw(FileHandle);
  7         15  
  7         74  
23 7     7   25965 use Types::Path::Tiny qw(File Path);
  7         404804  
  7         105  
24              
25 7     7   7389 use MIDI::Util qw(midi_dump);
  7         21485  
  7         1733  
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__