blib/lib/Plack/Middleware/BrowserDetector.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 22 / 22 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
↑ Summary
1 package Plack::Middleware::BrowserDetector;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use HTTP::BrowserDetect;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use parent 'Plack::Middleware';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 6 ▶sub call {
Subroutine call: called CC=1 SCAR=0.0
Pod documented
8 6 my ($self, $env) = @_;
9 6 $env->{'BrowserDetector.browser'} = HTTP::BrowserDetect->new($env->{HTTP_USER_AGENT});
10 6 return $self->app->($env);
11 }
12  
13 2 1;
14  
15 __END__
↑ Summary