File Coverage

blib/lib/Catalyst/Plugin/DoCoMoUID.pm
Criterion Covered Total %
statement 6 10 60.0
branch 0 2 0.0
condition n/a
subroutine 2 3 66.6
pod 0 1 0.0
total 8 16 50.0


line stmt bran cond sub pod time code
1             package Catalyst::Plugin::DoCoMoUID;
2            
3 1     1   6 use strict;
  1         2  
  1         40  
4 1     1   6 use warnings;
  1         2  
  1         173  
5            
6             our $VERSION = '0.01';
7            
8             sub prepare_headers {
9 0     0 0   my $c = shift;
10 0           $c->NEXT::prepare_headers(@_);
11 0 0         if ($c->req->user_agent =~ /^DoCoMo/) {
12 0           $c->req->header('X-DoCoMo-UID' => $c->req->query_parameters->{uid});
13             }
14             }
15            
16             1;
17            
18             __END__