Branch Coverage

blib/lib/Game/Tibia/Packet/Login.pm
Criterion Covered Total %
branch 38 60 63.3


line true false branch
43 0 3 if exists $params{'tibia'} and not $params{'tibia'} =~ /^\d+$/u
72 0 3 if not defined $self->{'version'} or $self->{'version'} >= 980
76 2 1 if ($self->{'versions'}{'client'}{'rsa'})
77 0 2 if (defined $self->{'rsa'} and not &blessed($self->{'rsa'}))
80 2 0 if defined $self->{'rsa'}
83 2 1 if (defined $self->{'packet'})
87 0 2 if $cmd ne 1 and $cmd ne 10
89 2 0 if ($cmd == 1)
94 1 1 if ($self->{'versions'}{'client'}{'rsa'})
96 0 1 unless $payload =~ /^\0/u
100 1 1 if ($self->{'versions'}{'client'}{'xtea'})
104 0 2 if ($cmd == 10)
108 0 2 $self->{'versions'}{'client'}{'acc_name'} ? :
110 0 2 if ($cmd == 10)
114 0 2 if ($cmd == 10)
134 2 0 if defined $self->{'rsa'}
135 0 2 unless ref $self->{'versions'}{'client'}
138 1 1 if ($self->{'versions'}{'client'}{'rsa'})
139 0 1 unless &blessed($rsa)
140 0 1 unless $rsa->size == 128
145 0 2 defined $self->{'character'} ? :
149 0 2 defined $self->{'character'} ? :
151 0 2 $self->{'versions'}{'client'}{'acc_name'} ? :
153 1 1 if $self->{'versions'}{'client'}{'xtea'}
154 0 2 if defined $self->{'gmflag'}
156 0 2 if defined $self->{'character'}
158 0 2 if defined $self->{'nonce'}
159 1 1 if defined $self->{'undecoded'} and $self->{'undecoded'} ne ''
161 1 1 if ($self->{'versions'}{'client'}{'rsa'})
169 0 2 if ($self->{'versions'}{'client'}{'adler32'})