File Coverage

blib/lib/HTTP/MobileAttribute/Agent/AirHPhone.pm
Criterion Covered Total %
statement 15 15 100.0
branch 2 2 100.0
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 21 22 95.4


line stmt bran cond sub pod time code
1             package HTTP::MobileAttribute::Agent::AirHPhone;
2 27     27   879 use strict;
  27         61  
  27         1006  
3 27     27   151 use warnings;
  27         61  
  27         757  
4 27     27   713 use HTTP::MobileAttribute::Agent::Base;
  27         70  
  27         227  
5              
6             __PACKAGE__->mk_accessors(qw/name vendor model model_version browser_version cache_size/);
7              
8             sub parse {
9 21     21 0 111 my ($self, ) = @_;
10              
11 21 100       99 $self->user_agent =~ m!^Mozilla/3\.0\((WILLCOM|DDIPOCKET);(.*)\)! or return $self->no_match;
12 20         75 $self->{name} = $1;
13 20         101 @{$self}{qw(vendor model model_version browser_version cache_size)} = split m!/!, $2;
  20         124  
14 20         117 $self->{cache_size} =~ s/^c//i;
15             }
16              
17             1;