File Coverage

blib/lib/Net/NicoVideo/Response.pm
Criterion Covered Total %
statement 12 20 60.0
branch n/a
condition n/a
subroutine 4 8 50.0
pod 0 4 0.0
total 16 32 50.0


line stmt bran cond sub pod time code
1             package Net::NicoVideo::Response;
2              
3 3     3   19 use strict;
  3         4  
  3         116  
4 3     3   15 use warnings;
  3         6  
  3         93  
5 3     3   16 use vars qw($VERSION);
  3         6  
  3         181  
6             $VERSION = '0.28';
7              
8             # NOTE: Never inherit with classes that have "get()" or "set()",
9             # because these interfere with _component which is decorated with Net::NicoVideo::Decorator
10 3     3   16 use base qw(Net::NicoVideo::Decorator);
  3         7  
  3         1234  
11              
12             sub is_authflagged {
13 0     0 0   my $self = shift;
14 0           $self->headers->header('x-niconico-authflag');
15             }
16              
17             # a client has to check is_success and is_content_success
18             # before calling this
19             sub parsed_content { # abstract
20 0     0 0   my $self = shift;
21 0           Net::NicoVideo::Content->new($self->_component)->parse;
22             }
23              
24             # DEPRECATED - use Net::NicoVideo::Content#is_success instead
25             sub is_content_success { # abstract
26 0     0 0   my $self = shift;
27 0           $self->parsed_content->is_success;
28             }
29              
30             # DEPRECATED - use Net::NicoVideo::Content#is_error instead
31             sub is_content_error { # abstract
32 0     0 0   my $self = shift;
33 0           $self->parsed_content->is_error;
34             }
35              
36              
37             1;
38             __END__