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.7003';
3             our $AUTHORITY = 'cpan:GENE';
4              
5             # ABSTRACT: Type library for MIDI::Drummer::Tiny
6              
7 7     7   199477 use strict;
  7         10  
  7         200  
8 7     7   23 use warnings;
  7         23  
  7         456  
9              
10             use Type::Library
11 7         82 -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   2894 );
  7         224616  
21 7     7   1492014 use Type::Utils -all;
  7         45  
  7         54  
22 7     7   14214 use Types::Standard qw(FileHandle);
  7         13  
  7         56  
23 7     7   17009 use Types::Path::Tiny qw(File Path);
  7         256914  
  7         56  
24              
25 7     7   4585 use MIDI::Util qw(midi_dump);
  7         12403  
  7         1291  
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__