blib/lib/CPAN/Distrostatus.pm

filter: Statementstmt 70.9% 22 / 31 Branchbran 30.0% 3 / 10 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 63.6% 7 / 11 Podpod 0.0% 0 / 8 totaltotal 53.3% 32 / 60 CC 7 SCAR 9.8
CC
7
Cov
61%
something_has_just_failed
6.0
something_has_just_failed
6.0
new
2.5
CRAP 2.7
« blib/lib/CPAN/Exception/blocked_urllist.pm ↑ Summary blib/lib/CPAN/URL.pm »
1 # -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*-
2 # vim: ts=4 sts=4 sw=4:
3 package CPAN::Distrostatus;
4 26 ▶use overload '""' => "as_string",
Subroutine BEGIN: called CC=1 SCAR=0.0
5 26 fallback => 1;
6 26 ▶use vars qw($something_has_failed_at);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 26 ▶use vars qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
8 $VERSION
9 26 );
10 26 $VERSION = "5.5";
11  
12  
13 21 ▶sub new {
Subroutine new: called CC=2 SCAR=9.2
Pod undocumented
14 0 ▶ my($class,$arg) = @_;
Subroutine new: not called CC=2 SCAR=9.2
Pod undocumented
15 0 my $failed = substr($arg,0,2) eq "NO";
16 0 ▶ if ($failed) {
Branch: 2 branches
BranchTrueFalseTotal
if ($failed) 4 17 21
if ($failed) 0 0 0
17 0 $something_has_failed_at = $CPAN::CurrentCommandId;
18 }
19 bless {
20 0 TEXT => $arg,
21 FAILED => $failed,
22 COMMANDID => $CPAN::CurrentCommandId,
23 TIME => time,
24 }, $class;
25 }
26 0 ▶sub something_has_just_failed () {
Subroutine something_has_just_failed: not called CC=2 SCAR=17.9
Pod undocumented
27 0 ▶ defined $something_has_failed_at &&
Subroutine something_has_just_failed: not called CC=2 SCAR=17.9
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
defined $something_has_failed_at and $something_has_failed_at == $CPAN::CurrentCommandId 0 0 0
defined $something_has_failed_at and $something_has_failed_at == $CPAN::CurrentCommandId 0 0 0
28 $something_has_failed_at == $CPAN::CurrentCommandId;
29 }
30 0 ▶sub commandid { shift->{COMMANDID} }
Subroutine commandid: not called CC=1 SCAR=6.9
Pod undocumented
31 7 ▶sub failed { shift->{FAILED} }
Subroutine failed: called CC=1 SCAR=0.0
Pod undocumented
32 16 ▶sub text {
Subroutine text: called CC=2 SCAR=7.6
Pod undocumented
33 16 my($self,$set) = @_;
34 16 ▶ if (defined $set) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $set) 0 16 16
35 0 $self->{TEXT} = $set;
36 }
37 16 $self->{TEXT};
38 }
39 16 ▶sub as_string {
Subroutine as_string: called CC=1 SCAR=0.0
Pod undocumented
40 16 my($self) = @_;
41 16 $self->text;
42 }
43  
44  
45 26 1;
« blib/lib/CPAN/Exception/blocked_urllist.pm ↑ Summary blib/lib/CPAN/URL.pm »