Controller/Static.pm untested

filter: Statementstmt 0.0% 0 / 10 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 17 Podpod 0.0% 0 / 14 totaltotal 0.0% 0 / 41 CC 1 SCAR 6.9
CC
1
Cov
0%
static
2.0
static_png
2.0
static_svg
2.0
CRAP 2.0
1 package Terse::Controller::Static;
2  
3 use strict;
4 use warnings;
5  
6 use base 'Terse::Controller';
7  
8 sub static :get :view(static) :path(static/(.*\.js)) :captured(1) :content_type(application/javascript) { }
9  
10 sub static_png :get(static) :view(static) :path(static/(.*\.png)) :captured(1) :content_type(image/png) { }
11  
12 sub static_svg :get(static) :view(static) :path(static/(.*\.svg)) :captured(1) :content_type(image/svg) { }
13  
14 sub static_jpeg :get(static) :view(static) :path(static/(.*\.jpeg)) :captured(1) :content_type(image/jpeg) { }
15  
16 sub static_gif :get(static) :view(static) :path(static/(.*\.gif)) :captured(1) :content_type(image/gif) { }
17  
18 sub static_json :get(static) :view(static) :path(static/(.*\.json)) :captured(1) :content_type(application/json) { }
19  
20 sub static_html :get(static) :view(static) :path(static/(.*\.html)) :captured(1) :content_type(text/html) { }
21  
22 sub static_plain :get(static) :view(static) :path(static/(.*\.txt)) :captured(1) :content_type(text/plain) { }
23  
24 sub static_css :get(static) :view(static) :path(static/(.*\.css)) :captured(1) :content_type(text/css) { }
25  
26 sub static_eot :get(static) :view(static) :path(static/(.*\.eot)) :captured(1) :content_type(application/vnd.ms-fontobject) { }
27  
28 sub static_ttf :get(static) :view(static) :path(static/(.*\.ttf)) :captured(1) :content_type(application/font-sfnt) { }
29  
30 sub static_woff :get(static) :view(static) :path(static/(.*\.woff2*)) :captured(1) :content_type(application/font-woff) { }
31  
32 sub static_mov :get(static) :view(static) :path(static/(.*\.mov*)) :captured(1) :content_type(video/mp4) { }
33  
34 sub static_mp4 :get(static) :view(static) :path(static/(.*\.mp4*)) :captured(1) :content_type(video/mp4) { }
35  
36 1;
37  
38 __END__;