| 1 | package Mojo::Weixin::Group::Member; | ||||||||||||||||||||||||||||||||||||||
| 2 | 1 | ▶ | use Mojo::Weixin::Base 'Mojo::Weixin::Model::Base'; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||||||||||||
| 4 | 1 | has name => ''; | |||||||||||||||||||||||||||||||||||||
| 5 | 1 | has [qw( | |||||||||||||||||||||||||||||||||||||
| 6 | account | ||||||||||||||||||||||||||||||||||||||
| 7 | province | ||||||||||||||||||||||||||||||||||||||
| 8 | city | ||||||||||||||||||||||||||||||||||||||
| 9 | sex | ||||||||||||||||||||||||||||||||||||||
| 10 | id | ||||||||||||||||||||||||||||||||||||||
| 11 | uid | ||||||||||||||||||||||||||||||||||||||
| 12 | signature | ||||||||||||||||||||||||||||||||||||||
| 13 | display | ||||||||||||||||||||||||||||||||||||||
| 14 | markname | ||||||||||||||||||||||||||||||||||||||
| 15 | _group_id | ||||||||||||||||||||||||||||||||||||||
| 16 | _avatar | ||||||||||||||||||||||||||||||||||||||
| 17 | )]; | ||||||||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||||||
| 19 | 0 | ▶ | sub new { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||
| 20 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||
| 21 | 0 | $self = $self->Mojo::Weixin::Base::new(@_); | |||||||||||||||||||||||||||||||||||||
| 22 | 0 | $self->client->emoji_convert(\$self->{markname},$self->client->emoji_to_text); | |||||||||||||||||||||||||||||||||||||
| 23 | 0 | $self->client->emoji_convert(\$self->{display},$self->client->emoji_to_text); | |||||||||||||||||||||||||||||||||||||
| 24 | #$self->client->emoji_convert(\$self->{name},$self->client->emoji_to_text); | ||||||||||||||||||||||||||||||||||||||
| 25 | 0 | ▶ | $self->uid("") if not $self->uid; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 26 | 0 | $self; | |||||||||||||||||||||||||||||||||||||
| 27 | } | ||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||
| 29 | 0 | ▶ | sub get_avatar{ | ||||||||||||||||||||||||||||||||||||
|
Subroutine
get_avatar: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||
| 30 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||
| 31 | 0 | $self->client->get_avatar($self,@_); | |||||||||||||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||||||||||||
| 33 | 0 | ▶ | sub displayname{ | ||||||||||||||||||||||||||||||||||||
|
Subroutine
displayname: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||
| 34 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||
| 35 | 0 | ▶ | return $self->display || $self->markname || $self->name || '昵称未知'; | ||||||||||||||||||||||||||||||||||||
|
Condition0%0/8
$self->display || $self->markname || $self->name || "\346\230\265\347\247\260\346\234\252\347\237\245"
$self->display or $self->markname or $self->name
$self->display or $self->markname
MC/DC0%0/3
$self->display || $self->markname || $self->name || "\346\230\265\347\247\260\346\234\252\347\237\245"
$self->display
$self->markname
$self->name
Truth table0%0/4
A or B or C
A= $self->displayB= $self->marknameC= $self->name
| |||||||||||||||||||||||||||||||||||||||
| 36 | } | ||||||||||||||||||||||||||||||||||||||
| 37 | 0 | ▶ | sub update{ | ||||||||||||||||||||||||||||||||||||
|
Subroutine
update: not called CC=12 SCAR=50.5
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||
| 38 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||
| 39 | 0 | my $hash = shift; | |||||||||||||||||||||||||||||||||||||
| 40 | 0 | for(grep {substr($_,0,1) ne "_"} keys %$hash){ | |||||||||||||||||||||||||||||||||||||
| 41 | 0 | ▶ | if(exists $hash->{$_}){ | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 42 | 0 | ▶ | $self->client->emoji_convert(\$hash->{$_},$self->client->emoji_to_text) if $_ eq "markname"; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 43 | 0 | ▶ | $self->client->emoji_convert(\$hash->{$_},$self->client->emoji_to_text) if $_ eq "display"; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 44 | 0 | ▶ | if(defined $hash->{$_} and defined $self->{$_}){ | ||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition0%0/3
defined $hash->{$_} and defined $self->{$_}
MC/DC0%0/2
defined $hash->{$_} and defined $self->{$_}
defined $hash->{$_}
defined $self->{$_}
Truth table0%0/3
A and B
A= defined $hash->{$_}B= defined $self->{$_}
| |||||||||||||||||||||||||||||||||||||||
| 45 | 0 | ▶ | if($hash->{$_} ne $self->{$_}){ | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 46 | 0 | my $old_property = $self->{$_}; | |||||||||||||||||||||||||||||||||||||
| 47 | 0 | my $new_property = $hash->{$_}; | |||||||||||||||||||||||||||||||||||||
| 48 | 0 | $self->{$_} = $hash->{$_}; | |||||||||||||||||||||||||||||||||||||
| 49 | 0 | ▶ | $self->client->emit("group_member_property_change"=>$self,$_,$old_property,$new_property) if defined $self->client; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 50 | } | ||||||||||||||||||||||||||||||||||||||
| 51 | } | ||||||||||||||||||||||||||||||||||||||
| 52 | ▶ | elsif( ! (!defined $hash->{$_} and !defined $self->{$_}) ){ | |||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
defined $hash->{$_} || defined $self->{$_}
MC/DC0%0/2
defined $hash->{$_} || defined $self->{$_}
defined $hash->{$_}
defined $self->{$_}
Truth table0%0/3
A || B
A= defined $hash->{$_}B= defined $self->{$_}
| |||||||||||||||||||||||||||||||||||||||
| 53 | 0 | my $old_property = $self->{$_}; | |||||||||||||||||||||||||||||||||||||
| 54 | 0 | my $new_property = $hash->{$_}; | |||||||||||||||||||||||||||||||||||||
| 55 | 0 | $self->{$_} = $hash->{$_}; | |||||||||||||||||||||||||||||||||||||
| 56 | 0 | ▶ | $self->client->emit("group_member_property_change"=>$self,$_,$old_property,$new_property) if defined $self->client; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 57 | } | ||||||||||||||||||||||||||||||||||||||
| 58 | } | ||||||||||||||||||||||||||||||||||||||
| 59 | } | ||||||||||||||||||||||||||||||||||||||
| 60 | 0 | $self; | |||||||||||||||||||||||||||||||||||||
| 61 | } | ||||||||||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||||||||||
| 63 | 0 | ▶ | sub group { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
group: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||
| 64 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||
| 65 | 0 | return scalar $self->client->search_group(id=>$self->_group_id); | |||||||||||||||||||||||||||||||||||||
| 66 | } | ||||||||||||||||||||||||||||||||||||||
| 67 | 0 | ▶ | sub make_friend{ | ||||||||||||||||||||||||||||||||||||
|
Subroutine
make_friend: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||
| 68 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||
| 69 | 0 | $self->client->make_friend($self,@_); | |||||||||||||||||||||||||||||||||||||
| 70 | } | ||||||||||||||||||||||||||||||||||||||
| 71 | 0 | ▶ | sub set_markname { | ||||||||||||||||||||||||||||||||||||
|
Subroutine
set_markname: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||
| 72 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||
| 73 | 0 | $self->client->set_markname($self,@_); | |||||||||||||||||||||||||||||||||||||
| 74 | } | ||||||||||||||||||||||||||||||||||||||
| 75 | 1 | 1; | |||||||||||||||||||||||||||||||||||||