File Coverage

blib/lib/Mojo/Webqq/Message.pm
Criterion Covered Total %
statement 3 8 37.5
branch 0 2 0.0
condition n/a
subroutine 1 2 50.0
pod n/a
total 4 12 33.3


line stmt bran cond sub pod time code
1             package Mojo::Webqq::Message;
2 1     1   8 use Mojo::Webqq::Base 'Mojo::Webqq::Message::Base';
  1         2  
  1         11  
3             has time => sub{time};
4             has source => 'local';
5             has from => "none";
6             has ttl => 5;
7             has cb => undef;
8             has allow_plugin => 1;
9             has format => 'text';
10             has [qw(id via type class discuss_id sender_id receiver_id group_id content raw_content)];
11             has [qw(sender receiver group discuss)];
12             has [qw(state client_type)];
13             has code => -2;
14             has msg =>'未初始化';
15             has info =>'未初始化';
16             has send_real_comp_sign => undef; #是否使用「真正的」大于/小于号。undef意为与$client->default_send_real_comp_sign一致。
17              
18             #兼容老版本属性msg_class/msg_id/msg_time
19             sub AUTOLOAD {
20 0     0     my $self = shift;
21 0 0         if($Mojo::Webqq::Message::AUTOLOAD =~ /.*::msg_(.*)/){
22 0           my $attr = $1;
23 0           $self->$attr(@_);
24             }
25 0           else{die("undefined subroutine $Mojo::Webqq::Message::AUTOLOAD");}
26             }
27              
28             1;