Generator/Reader.pm

filter: Statementstmt 50.0% 10 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 3 / 6 Podpod 0.0% 0 / 3 totaltotal 44.8% 13 / 29 CC 1 SCAR 4.1
CC
1
Cov
50%
new
2.0
init
2.0
getContent
2.0
CRAP 1.5
« Generator.pm ↑ Summary
1 package EBook::Generator::Reader;
2  
3 1 ▶use 5.008009;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 our $VERSION = '0.01';
8  
9 sub new
10 0 ▶{
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
11 0 my ($class, @args) = @_;
12 0 my $self = bless {}, $class;
13 0 return $self->init(@args);
14 }
15  
16 sub init
17 0 ▶{
Subroutine init: not called CC=1 SCAR=6.9
Pod undocumented
18 0 my ($self, $browser) = @_;
19 0 $self->{'browser'} = $browser;
20 0 return $self;
21 }
22  
23 sub getContent
24 0 ▶{
Subroutine getContent: not called CC=1 SCAR=6.9
Pod undocumented
25 0 my ($self, $url) = @_;
26 # fetch webpage html
27 0 my $request = HTTP::Request->new(GET => $url);
28 0 my $response = $self->{'browser'}->request($request);
29 0 return $response->content();
30 }
31  
32 1 1;
33 __END__
« Generator.pm ↑ Summary