blib/lib/Catalyst/Plugin/MobileUserID.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 7 | 9 | 77.7 |
branch | n/a | ||
condition | n/a | ||
subroutine | 3 | 3 | 100.0 |
pod | n/a | ||
total | 10 | 12 | 83.3 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Catalyst::Plugin::MobileUserID; | ||||||
2 | |||||||
3 | 1 | 1 | 6 | use strict; | |||
1 | 2 | ||||||
1 | 47 | ||||||
4 | 1 | 1 | 8 | use warnings; | |||
1 | 2 | ||||||
1 | 39 | ||||||
5 | 1 | 1 | 659 | use Catalyst::Request; | |||
0 | |||||||
0 | |||||||
6 | use HTTP::MobileUserID; | ||||||
7 | |||||||
8 | our $VERSION = '0.01'; | ||||||
9 | |||||||
10 | { | ||||||
11 | package Catalyst::Request; | ||||||
12 | sub mobile_userid { | ||||||
13 | my $req = shift; | ||||||
14 | $req->{mobile_userid} ||= HTTP::MobileUserID->new($req->mobile_agent); | ||||||
15 | } | ||||||
16 | } | ||||||
17 | |||||||
18 | 1; | ||||||
19 | |||||||
20 | __END__ |