blib/lib/WebApp/Helpers/MimeTypes.pm

filter: Statementstmt 100% 18 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 100% 25 / 25 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
↑ Summary
1 package WebApp::Helpers::MimeTypes;
2  
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 MIME::Types;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 2 our $VERSION = "0.02";
11  
12  
13 2 has mime_types => (is => 'ro', lazy => 1, builder => 1);
14 1 ▶sub _build_mime_types { MIME::Types->new }
Subroutine _build_mime_types: called CC=1 SCAR=0.0
15  
16 1 ▶sub mime_type_for {
Subroutine mime_type_for: called CC=1 SCAR=0.0
Pod documented
17 1 my ($self, $ext) = @_;
18 1 return $self->mime_types->mimeTypeOf($ext)->type();
19 }
20  
21  
22  
23  
24 2 1;
25 __END__
↑ Summary