| 1 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 2 | 0 | ▶ | sub Mojo::Weixin::_webwxstatusnotify { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_webwxstatusnotify: not called CC=7 SCAR=40.3
| |||||||||||||||||||||||||||||||||||||||||||
| 3 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 4 | 0 | my $id = shift; | |||||||||||||||||||||||||||||||||||||||||
| 5 | 0 | ▶ | my $code = shift || 3; | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
shift() || 3
MC/DC0%0/1
shift() || 3
shift()
Truth table0%0/2
A
A= shift()
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | 0 | $self->debug("发送状态通知..."); | |||||||||||||||||||||||||||||||||||||||||
| 7 | 0 | my $api = "https://". $self->domain . "/cgi-bin/mmwebwx-bin/webwxstatusnotify"; | |||||||||||||||||||||||||||||||||||||||||
| 8 | 0 | ▶ | my @query_string = (pass_ticket => $self->url_escape($self->pass_ticket)) if $self->pass_ticket; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | my $post = { | ||||||||||||||||||||||||||||||||||||||||||
| 10 | BaseRequest => { | ||||||||||||||||||||||||||||||||||||||||||
| 11 | Uin => $self->wxuin, | ||||||||||||||||||||||||||||||||||||||||||
| 12 | Sid => $self->wxsid, | ||||||||||||||||||||||||||||||||||||||||||
| 13 | Skey => $self->skey, | ||||||||||||||||||||||||||||||||||||||||||
| 14 | DeviceID => $self->deviceid, | ||||||||||||||||||||||||||||||||||||||||||
| 15 | }, | ||||||||||||||||||||||||||||||||||||||||||
| 16 | 0 | ▶ | ClientMsgId => sub{my $r = sprintf "%.3f", rand();$r=~s/\.//g;return $self->now() . $r;}->(), | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
Condition0%0/3
$id || $self->user->id
MC/DC0%0/2
$id || $self->user->id
$id
$self->user->id
Truth table0%0/3
A || B
A= $idB= $self->user->id
| |||||||||||||||||||||||||||||||||||||||||||
| 17 | Code => $code, | ||||||||||||||||||||||||||||||||||||||||||
| 18 | FromUserName => $self->user->id, | ||||||||||||||||||||||||||||||||||||||||||
| 19 | ToUserName => $id || $self->user->id, | ||||||||||||||||||||||||||||||||||||||||||
| 20 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||||||||||
| 22 | 0 | my $json = $self->http_post($self->gen_url($api,@query_string),{json=>1,Referer=>'https://' . $self->domain . '/'},json=>$post); | |||||||||||||||||||||||||||||||||||||||||
| 23 | 0 | ▶ | if(not defined $json or (defined $json and $json->{BaseResponse}{Ret}!=0)){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
not defined $json or defined $json and $json->{"BaseResponse"}{"Ret"} != 0
defined $json and $json->{"BaseResponse"}{"Ret"} != 0
MC/DC0%0/3
not defined $json or defined $json and $json->{"BaseResponse"}{"Ret"} != 0
not defined $json
defined $json
$json->{"BaseResponse"}{"Ret"} != 0
Truth table0%0/4
not(A) or B and C
A= not defined $jsonB= defined $jsonC= $json->{"BaseResponse"}{"Ret"} != 0
| |||||||||||||||||||||||||||||||||||||||||||
| 24 | 0 | $self->warn("发送状态通知失败"); | |||||||||||||||||||||||||||||||||||||||||
| 25 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||||||||||||||||
| 27 | 0 | return 1; | |||||||||||||||||||||||||||||||||||||||||
| 28 | } | ||||||||||||||||||||||||||||||||||||||||||
| 29 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||