File Coverage

blib/lib/WWW/BackpackTF/User.pm
Criterion Covered Total %
statement 10 26 38.4
branch 0 2 0.0
condition 0 16 0.0
subroutine 4 19 21.0
pod 15 16 93.7
total 29 79 36.7


line stmt bran cond sub pod time code
1             package WWW::BackpackTF::User;
2              
3 2     2   23 use 5.014000;
  2         5  
4 2     2   15 use strict;
  2         2  
  2         30  
5 2     2   7 use warnings;
  2         1  
  2         558  
6             our $VERSION = '0.002';
7              
8             sub new{
9 1     1 0 3 my ($class, $content) = @_;
10 1         6 bless $content, $class
11             }
12              
13 0     0 1   sub steamid { shift->{steamid} }
14 0     0 1   sub name { shift->{name} }
15 0     0 1   sub reputation { shift->{backpack_tf_reputation} }
16 0     0 1   sub group { shift->{backpack_tf_group} }
17 0   0 0 1   sub positive { shift->{backpack_tf_trust}->{for} // 0 }
18 0   0 0 1   sub negative { shift->{backpack_tf_trust}->{against} // 0 }
19 0     0 1   sub scammer { shift->{steamrep_scammer} }
20 0     0 1   sub banned_backpack { shift->{backpack_tf_banned} }
21 0     0 1   sub banned_economy { shift->{ban_economy} }
22 0     0 1   sub banned_community { shift->{ban_community} }
23 0     0 1   sub banned_vac { shift->{ban_vac} }
24 0   0 0 1   sub notifications { shift->{notifications} // 0 }
25 0   0 0 1   sub value { shift->{backpack_value}->{shift // WWW::BackpackTF::TF2} }
26 0   0 0 1   sub update { shift->{backpack_update}->{shift // WWW::BackpackTF::TF2} }
27              
28             sub banned {
29 0     0 1   my ($self) = @_;
30 0 0 0       $self->banned_backpack || $self->banned_community || $self->banned_economy || $self->banned_vac
      0        
31             }
32              
33             1;
34             __END__