Devel/IPerl/Display/AudioMPEG.pm

filter: Statementstmt 71.4% 15 / 21 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 0.0% 0 / 1 totaltotal 63.3% 19 / 30 CC 2 SCAR 9.4
CC
2
Cov
65%
iperl_data_representations
6.0
_build_mimetype
2.0
BEGIN
1.0
CRAP 2.6
« Devel/IPerl/Kernel/Backend/DevelREPL.pm ↑ Summary Devel/IPerl/Display/Role/Source.pm »
1 package Devel::IPerl::Display::AudioMPEG;
2 2 $Devel::IPerl::Display::AudioMPEG::VERSION = '0.012';
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 with qw(Devel::IPerl::Display::Role::Displayable Devel::IPerl::Display::Role::MIMESource);
8 2 ▶use Try::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 0 ▶sub _build_mimetype { 'audio/mpeg' }
Subroutine _build_mimetype: not called CC=1 SCAR=6.9
11 0 ▶sub iperl_data_representations {
Subroutine iperl_data_representations: not called CC=2 SCAR=17.9
Pod undocumented
12 0 my ($self) = @_;
13 0 my $data = $self->_data; # TODO when data is not retrievable
14 0 ▶ return unless defined $data;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $data 0 0 0
15 return {
16 0 $self->mimetype => $data,
17 "text/plain" => '[MPEG audio]', # TODO get length
18 0 "text/html" => qq|<audio controls src="@{[ $self->_html_uri ]}" />|,
19 };
20 }
21  
22 2 1;
23  
24 __END__
« Devel/IPerl/Kernel/Backend/DevelREPL.pm ↑ Summary Devel/IPerl/Display/Role/Source.pm »