File Coverage

blib/lib/WWW/NHKProgram/API/Provider.pm
Criterion Covered Total %
statement 12 16 75.0
branch n/a
condition n/a
subroutine 4 5 80.0
pod 0 1 0.0
total 16 22 72.7


line stmt bran cond sub pod time code
1             package WWW::NHKProgram::API::Provider;
2 1     1   892 use strict;
  1         1  
  1         45  
3 1     1   5 use warnings;
  1         2  
  1         19  
4 1     1   5 use utf8;
  1         2  
  1         4  
5             use Class::Accessor::Lite::Lazy (
6 1         9 new => 1,
7             ro => [qw/furl api_key/],
8 1     1   1060 );
  1         2971  
9              
10             sub dispatch {
11 0     0 0   my ($self, $api_name, $arg, $raw) = @_;
12              
13 0           my $class = __PACKAGE__ . '::' . ucfirst($api_name);
14 0           eval "require $class"; ## no critic
15              
16 0           $class->call($self, $arg, $raw);
17             }
18              
19             1;
20