| 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
| |||||||||||
| 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__ | ||||||||||