Branch Coverage

lib/Mailru/Cloud/Auth.pm
Criterion Covered Total %
branch 24 46 52.1


line true false branch
38 0 1 if ($code ne '200')
42 0 1 unless ($login_token)
65 0 1 if ($code ne '200')
70 0 1 if ($json->{'status'} eq 'fail')
74 0 1 unless $self->__getToken
85 1 0 if ($res->is_success)
87 1 0 if ($content =~ /"csrf"\s*:\s*"([a-zA-Z0-9]+?)"/)
89 0 1 if $self->{'debug'}
91 1 0 if ($content =~ /"email"\s*:\s*"(.+?)"/)
93 0 1 if $self->{'debug'}
97 1 0 if ($content =~ /"BUILD"\s*:\s*"(.+?)"/)
99 0 1 if $self->{'debug'}
104 1 0 if ($content =~ /"x-page-id"\s*:\s*"(.+?)"/)
106 0 1 if $self->{'debug'}
121 1 0 if ($self->{'info'})
136 1 0 if (my($size_block) = $$content =~ /"space":\s*{([^}]*)}/s)
138 1 2 if ($1 eq 'bytes_total') { }
1 1 elsif ($1 eq 'bytes_used') { }
147 1 0 if ($$content =~ /"file_size_limit":\s*(.+?)[,\s]/)
155 14 0 if ($self->{'authToken'})
159 0 14 if ($code ne '200')
163 14 0 if $json_res->{'status'} eq 'ok'
164 0 0 if $self->login