blib/lib/WWW/BugMeNot.pm

filter: Statementstmt 54.8% 17 / 31 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 57.1% 4 / 7 Podpod 0.0% 0 / 3 totaltotal 46.6% 21 / 45 CC 3 SCAR 12.0
CC
3
Cov
49%
retrieve_bugmenot_url
6.0
parse_bugmenot_url
6.0
password
2.0
CRAP 3.3
↑ Summary
1 package WWW::BugMeNot;
2 1 require Exporter;
3  
4 1 our @ISA = qw(Exporter);
5 1 our @EXPORT = qw(password);
6 1 our $VERSION = '0.02';
7  
8 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use LWP::Simple;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use HTML::TokeParser;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13  
14 0 ▶sub password {
Subroutine password: not called CC=1 SCAR=6.9
Pod undocumented
15 0 my $url = $_[0];
16 0 my $retrieved_bugmenot_page = &retrieve_bugmenot_url($url);
17 0 my @userpass = &parse_bugmenot_url($retrieved_bugmenot_page);
18 0 return @userpass;
19 }
20  
21  
22 0 ▶sub retrieve_bugmenot_url {
Subroutine retrieve_bugmenot_url: not called CC=2 SCAR=17.9
Pod undocumented
23 0 my $url = $_[0];
24 0 ▶ my $retrieved_page = get ("http://bugmenot.com/view.php?url=$url") or die("Could not retrieve http://bugmenot.com/view.php?url=$url");
Branch: 1 branch
BranchTrueFalseTotal
my $retrieved_page = &get("http://bugmenot.com/view.php?url=$url") or die "Could not retrieve http://bugmenot.com/view.php?url=$url" 0 0 0
25 0 return $retrieved_page;
26 }
27  
28  
29 0 ▶sub parse_bugmenot_url {
Subroutine parse_bugmenot_url: not called CC=2 SCAR=17.9
Pod undocumented
30 0 my $page = $_[0];
31 0 ▶ my $stream = HTML::TokeParser->new(\$page) or die("Parsing Error: $!");
Branch: 1 branch
BranchTrueFalseTotal
my $stream = "HTML::TokeParser"->new(\$page) or die "Parsing Error: $!" 0 0 0
32 0 $stream -> get_tag("dd");
33 0 my @userpass;
34 0 $userpass[0] = $stream -> get_text("br");
35 0 $userpass[1] = $stream -> get_text("/dd");
36 0 return @userpass;
37 }
38  
39  
40  
41 1 1;
42 __END__
↑ Summary