blib/lib/Weixin/Client/Private/_logout.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 3 | 10 | 30.0 |
branch | n/a | ||
condition | 0 | 2 | 0.0 |
subroutine | 1 | 2 | 50.0 |
pod | n/a | ||
total | 4 | 14 | 28.5 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Weixin::Client; | ||||||
2 | 1 | 1 | 4 | use Weixin::Util; | |||
1 | 1 | ||||||
1 | 129 | ||||||
3 | sub _logout { | ||||||
4 | 0 | 0 | my $self = shift; | ||||
5 | 0 | 0 | my $type = shift || 0; | ||||
6 | 0 | my $api = "https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxlogout"; | |||||
7 | 0 | my @query_string = ( | |||||
8 | redirect => 1, | ||||||
9 | type => $type, | ||||||
10 | skey => uri_escape($self->skey), | ||||||
11 | ); | ||||||
12 | 0 | my $post = [ | |||||
13 | sid => $self->wxsid, | ||||||
14 | uin => $self->wxuin, | ||||||
15 | ]; | ||||||
16 | 0 | $self->http_post(Weixin::Util::gen_url($api,@query_string),$post,(Referer=>"https://wx.qq.com/?&lang=zh_CN")); | |||||
17 | 0 | return 1; | |||||
18 | } | ||||||
19 | 1; |