Branch Coverage

blib/lib/Mojo/Weixin/Message/Remote/_get_media.pm
Criterion Covered Total %
branch 0 90 0.0


line true false branch
16 0 0 if ($msg->media_type eq 'image') { }
0 0 elsif ($msg->media_type eq 'voice') { }
0 0 elsif ($msg->media_type eq 'video' or $msg->media_type eq 'microvideo') { }
0 0 elsif ($msg->media_type eq 'emoticon') { }
0 0 elsif ($msg->media_type eq 'file') { }
19 0 0 if $self->skey
24 0 0 if $self->skey
29 0 0 if $self->skey
35 0 0 if $self->skey
55 0 0 unless (defined $data)
59 0 0 $data =~ /^GIF8/ ? :
60 0 0 $mime =~ m[^application/json]i ? :
0 0 $mime =~ m[^audio/mpeg]i ? :
0 0 $mime =~ m[^audio/mp3]i ? :
0 0 $mime =~ m[^video/mp4]i ? :
0 0 $mime =~ m[^application/json]i ? :
0 0 $mime =~ m[^text/json]i ? :
0 0 $mime =~ m[^text/html]i ? :
0 0 $mime =~ m[^text/plain]i ? :
0 0 $mime =~ m[^image/gif]i ? :
0 0 $mime =~ m[^image/bmp]i ? :
0 0 $mime =~ m[^image/png]i ? :
0 0 $mime =~ m[^image/jpe?g]i ? :
74 0 0 unless defined $type
76 0 0 if ($msg->format eq 'media' and $msg->media_type eq 'file')
77 0 0 if ($msg->media_name =~ /^.+?\.([^\.]+)$/)
78 0 0 if ($1)
84 0 0 unless defined $msg->media_mime
85 0 0 unless defined $msg->media_ext
90 0 0 if ($msg->media_size == 0)
91 0 0 if $msg->media_size == 0
93 0 0 if ref $callback eq 'CODE'
96 0 0 if (defined $self->media_dir and not -d $self->media_dir)
100 0 0 if ($msg->media_type eq 'file') { }
104 0 0 if ($^O eq 'MSWin32')
111 0 0 if ($i > 100)
120 0 0 unless open my $fh, '>', $path
121 0 0 if $^O ne 'MSWin32'
124 0 0 $^O eq 'MSWin32' ? :
125 0 0 if ref $callback eq 'CODE'
127 0 0 if $@
137 0 0 defined $self->media_dir ? :
141 0 0 if $^O ne 'MSWin32'
145 0 0 if ref $callback eq 'CODE'
147 0 0 if $@