blib/lib/CPAN/Prompt.pm

filter: Statementstmt 48.1% 13 / 27 Branchbran 0.0% 0 / 8 Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 42.8% 3 / 7 Podpod 0.0% 0 / 4 totaltotal 34.6% 17 / 49 CC 5 SCAR 19.7
CC
5
Cov
38%
as_string
12.0
as_string
12.0
new
2.0
CRAP 7.2
« lib/CPAN/Plugin.pm ↑ Summary blib/lib/CPAN/Distroprefs.pm »
1 # -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*-
2 # vim: ts=4 sts=4 sw=4:
3 package CPAN::Prompt;
4 26 ▶use overload '""' => "as_string";
Subroutine BEGIN: called CC=1 SCAR=0.0
5 26 ▶use vars qw($prompt);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 26 ▶use vars qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
7 $VERSION
8 26 );
9 26 $VERSION = "5.5";
10  
11  
12 26 $prompt = "cpan> ";
13 26 ▶$CPAN::CurrentCommandId ||= 0;
Condition50%1/2
$CPAN::CurrentCommandId ||= 0
l!l
026
MC/DC0%0/1
$CPAN::CurrentCommandId ||= 0
$CPAN::CurrentCommandId
Truth table50%1/2
A
A= $CPAN::CurrentCommandId
Aresult
11
00
14 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
15 0 ▶ bless {}, shift;
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
16 }
17 0 ▶sub as_string {
Subroutine as_string: not called CC=3 SCAR=24.8
Pod undocumented
18 0 ▶ my $word = "cpan";
Subroutine as_string: not called CC=3 SCAR=24.8
Pod undocumented
19 0 ▶ unless ($CPAN::META->{LOCK}) {
Branch: 2 branches
BranchTrueFalseTotal
unless ($CPAN::META->{"LOCK"}) 0 0 0
unless ($CPAN::META->{"LOCK"}) 0 0 0
20 0 $word = "nolock_cpan";
21 }
22 0 ▶ if ($CPAN::Config->{commandnumber_in_prompt}) {
Branch: 2 branches
BranchTrueFalseTotal
if ($CPAN::Config->{'commandnumber_in_prompt'}) { } 0 0 0
if ($CPAN::Config->{'commandnumber_in_prompt'}) { } 0 0 0
23 0 sprintf "$word\[%d]> ", $CPAN::CurrentCommandId;
24 } else {
25 0 "$word> ";
26 }
27 }
28  
29 26 1;
« lib/CPAN/Plugin.pm ↑ Summary blib/lib/CPAN/Distroprefs.pm »